Forum Discussion
Decomposition tree percentages based on first value
- 6 years ago
Hi Anonymous ,
I find a solution for you:
Instead of creating calculated columns,you can create a measure:
Measure 2 = IF ( HASONEFILTER ( 'Table'[category] ), COUNT ( 'Table'[measure] ) / CALCULATE ( COUNT ( 'Table'[measure] ), ALLEXCEPT ( 'Table', 'Table'[Plaza] ) ), COUNT ( 'Table'[measure] ) / CALCULATE ( COUNT ( 'Table'[measure] ), ALL ( 'Table' ) ) )Put measure 2 in the "Analyze" filed, and "plaza" and "category" in the "explain by":
Remember to set measure 2 as percentage:
Finally you will see:
For the related .pbix file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
In case anyone stumble upon this thread in the future I'll provide my solution.
This guy gave also gave a solution aligned to the previous answers https://bielite.com/blog/calculating-percent-of-subtotal/ous answers, however, not being DAX savvy by any means, reading new formulas like inscope gave heart palpitations.
So what I ended up doing is a couple of pie charts / bar charts to explain these %, the user can now filter in the decomposition tree and see the % on the other visuals. Not the cleanest solution, not the most sophisticated solution, but knowing the audience these categories will change several times and hopefully this approach will remain clear regardless of the order / categories in place.
Cheers,