Forum Discussion
OrthoData
6 years agoFrequent Visitor
Percent of multiple subsets over time
Greetings, all! I have a group of categories each with subcategories and totals for all. For example: Category Subcategory Count of Events 1 A ### 1 B ### 1 C ### 2 A ###...
- 6 years ago
Hi OrthoData ,
You need a measure to calculate % of all A's for total all events as below:
Measure = DIVIDE(CALCULATE(SUM('Table'[Count of Events]),ALLEXCEPT('Table','Table'[Subcategory])),CALCULATE(SUM('Table'[Count of Events]),ALL('Table')))And you will see:
Then you need a measure to calculate the percentage of SubCat A for each respective Category as below :
Measure 2 = DIVIDE(CALCULATE(SUM('Table'[Count of Events]),ALLEXCEPT('Table','Table'[Category]),FILTER('Table','Table'[Subcategory]=SELECTEDVALUE('Table'[Subcategory]))),CALCULATE(SUM('Table'[Count of Events]),ALL('Table')))And you will see:
For the related .pbix file,pls click here.
Best Regards,
Kelly
v-kelly-msft
Community Support
6 years agoHi OrthoData ,
You need a measure to calculate % of all A's for total all events as below:
Measure =
DIVIDE(CALCULATE(SUM('Table'[Count of Events]),ALLEXCEPT('Table','Table'[Subcategory])),CALCULATE(SUM('Table'[Count of Events]),ALL('Table')))
And you will see:
Then you need a measure to calculate the percentage of SubCat A for each respective Category as below :
Measure 2 = DIVIDE(CALCULATE(SUM('Table'[Count of Events]),ALLEXCEPT('Table','Table'[Category]),FILTER('Table','Table'[Subcategory]=SELECTEDVALUE('Table'[Subcategory]))),CALCULATE(SUM('Table'[Count of Events]),ALL('Table')))
And you will see:
For the related .pbix file,pls click here.
Best Regards,
Kelly
- OrthoData6 years agoFrequent Visitor
This works. Thank you,