Forum Discussion
Dynamic custom column workaround
- 7 years ago
Thanks for the reply Yuliana, this doesnt work unfortunately with my data as I need to run a calculation at row level then aggregate into categories.
I have found a solution by making a measure with a combintion of SUMX and ADDCOLUMNS. This runs the calculation by row level and can still be aggregated by category and run the sum correctly (rather than just running the calculation on the category totals).
Hi aucklanduser,
I would suggest you firstly have a look at Measure and Row Context.
Row context and Filter context in DAX
Power BI/PowerPivot: What is Row Context?
In your scenario, to make measures to display results at a row by row basis rather than an aggregated value, you shuold add an extra field (any type is available) which is not aggregated into the visual. Please see the difference in below screenshot.
Best regards,
Yuliana Gu
Thanks for the reply Yuliana, this doesnt work unfortunately with my data as I need to run a calculation at row level then aggregate into categories.
I have found a solution by making a measure with a combintion of SUMX and ADDCOLUMNS. This runs the calculation by row level and can still be aggregated by category and run the sum correctly (rather than just running the calculation on the category totals).