Multiply the columns with a value

I want to multiply a column with current month number

This is my dummy input

How do i multiply all the values of 2nd column with current month number and save it in 3rd column


You can use expressions

Dt.Columns("Total").Expression = "[Amount] * " + Now.Month.ToString


1 Like

Hey @Kira ,

You can use for each row in datatable
Assign currentrow(“Total”) = Currentrow(“Amount”)*monthVar

Hope it helps you out

1 Like

@Vikas_M ,

I dont want to use loops cause it makes my process slow, its a huge data

@Anil_G ,assign In a loop?


No a single assign will multiply full column …using expression

Expression says multiply Amount column with current month and save in totals


@Kira , if so then

  1. use an assign activity to assign the month

  2. Use an another assign activity
    Left side of assign would be

right side would be (9.5 KB)

Hope this helps you out!

Hey @Anil_G and @Vikas_M , Ill try this and let you know the results

1 Like

Thank you @Vikas_M , your method worked and thanks for the xaml

Also thank you for @Anil_G for helping me

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.