Forum Discussion
Calculate within group % over xaxis
- 6 years ago
Hi gcam032 ,
1.Create a dim table:
dimdate = ADDCOLUMNS(CALENDARAUTO(),"YEARMONTH",YEAR([Date])*100+MONTH([Date]))2.Create a measure:
Measure = CALCULATE(SUM('Table'[value])) / CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[Category]))Finally you will see:
For the related .pbxi file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Hi gcam032 ,
1.Create a dim table:
dimdate = ADDCOLUMNS(CALENDARAUTO(),"YEARMONTH",YEAR([Date])*100+MONTH([Date]))
2.Create a measure:
Measure = CALCULATE(SUM('Table'[value])) / CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[Category]))
Finally you will see:
For the related .pbxi file,pls click here.
Kelly
- gcam0326 years ago
Helper I
Hi Kelly,
Thanks for providing your solution. It's close, but I need a slightly different calculation - can you help?
In your example, considering the Purple one, the percentages should be:
11% (11)
56% (56)
34% (34)
Sum to 100%
Pink would be:
13% (8)
53% (34)
34% (22)
Sum to 100%
Does that make sense? It's within-group densities, where a group = YEARMONTH
- gcam0326 years ago
Helper I
After some trial and error- I figured out that I had to include the other filters I had applied to the chart. Your solution was spot on! Thank you!
- Ashish_Mathur6 years ago
Super User
Hi,
Share the link from where i can download your PBI file.