Join datatable issue regarding decimal values

Hi team ,

i have below 2 tables -
t1 -


t2-
image

I am facing issue while joining them both by

It is not matching 4924.4 with 4924.40 by considering the decimals which I want.
It is matching when both are 4924.40 but ideally 4924.4 and 4924.40 are same.

Kindly hep me with the solution for this or new approach to match these tables for the above scenario?

@ppr can you please help here
Regards,
G

Is there a way to round off the decimals for each row before matching the columns

Hello @gokul1904,

Either you can use the balareva activity to convert the column type to double for both the datatable.
Or
You can create two more datatable and load the row from these datatable to newly created datatable by doing the round of that columns.

Thanks,
Sanjit

How to convert to a different datatable -
image

I am not able to .

I want to make all the values of 4234.20 to 4234.2
and 4342.32 should remain 4342.32

Regards

I am getting error while doing this

let me create a sample xaml I will share it with you.

1 Like

Have a look and let me know if your issue is resolved.

ChangeColumnType.xaml (12.0 KB)
Test.xlsx (10.6 KB)

Thanks,
Sanjit

I am not able to load this activity - which package should I download -

image

Regards

Try to upgrade the System.Activities as this is the Excel Application Scope activity, I have not used external activity

Unfortunately I am not able to update the dependencies.It is going in infinite loop and I have to close the application.Will keep you posted

1 Like

you can check if the excel activities are available of lower version, use that for reading purpose.

Hello @gokul1904 - I would say try rounding off the decimal values before you actually compare and join. Have a look on the below thread for how to round off the data table values

Look at your datatable’s column properties. I bet they are both string columns.

For each of your two datatables, create a new column with datatype double. Then For Each Row in Datatable through each of them and assign the double column the value of CDbl(CurrentRow(“oldcolumn”).ToString)

Now you’ll have actual numeric values in the new columns which will compare properly.