Forum Discussion
sparkplug93751
6 years agoHelper II
Hierarchy inside Measure
Hello, See attached example data My data has a planned number of people (planned column) per category There's 2 categories - the master column and legend where each legend fall beneath a ...
- 6 years ago
Hi,
Do you want to show this measure in matrix visual?
If so, please try this measure:
Measure = IF ( CALCULATE ( DISTINCTCOUNT ( 'Table'[Inside] ), ALLSELECTED ( 'Table' ) ) <> CALCULATE ( DISTINCTCOUNT ( 'Table'[Inside] ), ALL ( 'Table' ) ), IF ( ISINSCOPE ( 'Table'[Inside] ), BLANK (), CALCULATE ( MAXX ( ALLSELECTED ( 'Table' ), 'Table'[Plan] ), FILTER ( 'Table', 'Table'[Master] = SELECTEDVALUE ( 'Table'[Master] ) ) ) ), CALCULATE ( MAX ( 'Table'[Plan] ), FILTER ( 'Table', 'Table'[Master] = SELECTEDVALUE ( 'Table'[Master] ) && 'Table'[Inside] = SELECTEDVALUE ( 'Table'[Inside] ) ) ) )When only selecting master in slicer, it shows:
When both selecting master and inside in slicers, it shows:
Here is my changed pbix file:
Best Regards,
Giotto Zhi
amitchandak
6 years agoSuper User
Did not get it completely
https://community.powerbi.com/t5/Desktop/Hierarchy-of-calculated-measures/td-p/117433
https://visualbi.com/blogs/microsoft/powerbi/customizing-hierarchy-measures-dax-using-inscope/
sparkplug93751
6 years agoHelper II
The values are displaying correctly when inside a matrix but not when plotted on a line graph