Forum Discussion
Mic1979
1 year agoPost Partisan
Dynamic transformation and rounding
Hello all, I need to change the type only on the columns with $ in the header. I have the following code: TransformDollars = Table.TransformColumnTypes( renameColumns, List.Transform( ...
- 1 year ago
RoundDollars = Table.TransformColumns ( TransformDollars, List.Transform ( Dollars_Columns_Selected, // each {_, Number.Round(_, 3), type number})) >> this is wrong, must be each {_, (x) => Number.Round(x, 3), type number} ) )
Mic1979
1 year agoPost Partisan
Hello,
did you mean changes like this:
RoundDollars = Table.TransformColumns (
TransformDollars,
List.Accumulate(
Dollars_Columns_Selected,
TransformDollars,
(a,b)=> Table.TransformColumns(a,{{b, each Number.RoundUp(_,3), Int64.Type}})))
If so, I got the following error:
v-sgandrathi
1 year agoCommunity Support
Hi Mic1979 ,
Yes, Based on the data you provided, I have used it as sample data on my end and successfully implemented it. Therefore, please refer to the attached pbix file.
I hope this should resolve your issue, if you need any further assistance, feel free to reach out.
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thankyou,
Have a great day ahead.