In Excel two comparison,

Analytics www.changepond.com Location 20210707-20210713.xlsx (10.0 KB)
Analytics www.changepond.com Location 20210714-20210720.xlsx (9.0 KB)
I have compare the two excel given above,but here “Seychelles” country is not available so i need to write a “Seychelles” as 0 as given pcture o/p.
image

Output i need to get is,Aus =6 and canada = 85,Seychelles=0

Can any one please help me

Which one is your primary excel?

This is what I understand from your question

You have two excels. comparing two excel seychelles not in this Analytics www.changepond.com Location 20210707-20210713.xlsx
so you want update in value like ‘0’

And pushing down whatever value has left

1 Like

Analytics www.changepond.com Location 20210714-20210720.xlsx (9.0 KB) this is primary excel

in general joining datatable with Join DataTable Activity and/or a LINQ can help.

also have a look here:

1 Like

Will share some sample for you

1 Like

Need to compare 2 datatable and write a value in another datatable by particular column.

Here, i need to compare the 2 datatable by country column and if the country name is not available in another table write 0 in that appropriate cell and continue comparing to next and so on.

Can be done e.g. with join datatable activity. So give a try on following.

  • Prepare a target datatable with build datatable activity having Columns: Country, Prev, Current - dtTarget
  • Use Join DataTable: dt1 - prev week data, dt2 = current week data, Join Type: Full, Output: dtJoin | Join Columns = Country | Operation: =

Aftwerwards process the join result by
Assign activity
LeftSide: dtTarget
Righ side:

(From d in dtJoin.AsEnumerable
Let c = If(String.IsNullOrEmpty(d("Country_1").toString, d("Country)", d("Country_1"))
Let pr = If(String.IsNullOrEmpty(d("Users").toString, "0", d("Users"))
Let cr = If(String.IsNullOrEmpty(d("Users_1").toString, "0", d("Users_1"))
Let ra = new Object(){c,pr,cr}
Select dtTarget.Rows.add(ra)).CopyToDataTable
1 Like