Sharanabasava
(Sharanabasava Kallurmath)
1
Hi Team, I am using linq but value getting round figure when I run
Please find:
dtIDMSDatatableFilter.AsEnumerable.Sum(Function (x) If(Double.TryParse(x.item(“Sum”).ToString, Nothing), Double.Parse(x.Item(“Sum”).ToString),0))
when value of column is 436.57 but when I ran the bot I am getting 436.565
what need to make change in query?
prasath_S
(prasath S)
2
Hi @Sharanabasava
You could use my package ,it will have activity called math operation which gives the option of sum,max,min,average etc.
Sharanabasava
(Sharanabasava Kallurmath)
3
Hi Prasath,
client don’t need external package, so…
Can you check what’s need to be change?
@Sharanabasava It looks good.
Just add Math.Round function and make it round-up for 2 digits.
Math.Round(varDT1.AsEnumerable.Sum(Function (x) If(Double.TryParse(x.item("u").ToString, Nothing), Double.Parse(x.Item("Sum").ToString),0)),2)
Sharanabasava
(Sharanabasava Kallurmath)
5
Thanks Pravin, but when I used column with value of 436.57 and run the bot, I am getting 436.56
replace Math.Round with below
Math.Ceiling( 436.565 * 100)/100
Sharanabasava
(Sharanabasava Kallurmath)
8
Thanks Pravin, Its working
system
(system)
Closed
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.