Forum Discussion
murali5431
5 years agoHelper III
Reprt builder expression for calculation based on distinct values in a column
Hi, I have a power BI report builder which has duplicated rows (column A) as below. I need to calculate sum of column B based on unique values in column A. Please let me know the report builder e...
- Anonymous5 years ago
murali5431
A simple measure should do:Measure = SUMX(SUMMARIZE('Table',[Column A],'Table'[Column B]),[Column B])And if there are always 2 repeated values, you can also use:Measure = SUMX(DISTINCT('Table'[Column B]),[Column B])
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
murali5431
A simple measure should do:
Measure = SUMX(SUMMARIZE('Table',[Column A],'Table'[Column B]),[Column B])
And if there are always 2 repeated values, you can also use:
Measure = SUMX(DISTINCT('Table'[Column B]),[Column B])
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
murali5431
5 years agoHelper III
Anonymous It did work when I tried it in the power BI desktop where I have built the dataset. But, when I import this measure to the report builder report to which dataset is connected, it just gives me the first row value. Can you let me know what needs to be tweaked?