Forum Discussion
Sum of Distinct Count
atifakram First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
Thank you for your suggestion, Greg_Deckler!
However, I am currently using journey plans as a filter, and the manual calculation method is not producing consistent results.
I believe a dynamic solution would be the most effective way to address this issue.
- Greg_Deckler3 years agoCommunity Champion
atifakram There's no reason you can't respect the filters by using something like ALLSELECTED bu the key is that you need to SUMMARIZE the information in a table VAR the same way it is summarized in the matrix/table. So, you have 2 levels of summarization in your matrix. I have no clue what the column names are but you have the first level 14, 15 and then the second level which looks like some text description so the measure should be something along the lines of:
Measure Total = VAR __MeasureRow = [Current Measure] //this is the measure that returns the correct information by row VAR __CurrentCount = COUNTROWS('Table') VAR __AllCount = COUNTROWS(ALLSELECTED('Table') VAR __Table = SUMMARIZE(ALLSELECTED('Table'), [First Column], [Second Column], "__Value", [Current Measure]) VAR __Result = IF(__CurrentCount = __AllCount, SUMX(__Table,[__Value]), __MeasureRow) RETURN __Result