Forum Discussion
Anonymous
6 years agoNot applicable
Stacked bar chart help to use multiple values
I've 3 tables Table - GroupData (GroupName, MaxCount) WorkData(GroupName, HostName, CategoryName, Count, Date) Calendar(Date, Year) GroupData and WorkData are mapped 1...
- 6 years ago
Hi,
Please try to create this table first:
Table = UNION(DISTINCT('WorkData'[Category]),{{"MaxCount"}})Then try this measure:
Measure = SWITCH(SELECTEDVALUE('Table'[Category]),"MaxCount",MAX('GroupData'[MaxCount]),CALCULATE(SUM(WorkData[Count]),FILTER('WorkData','WorkData'[Category] in DISTINCT('Table'[Category]))))The result shows:
Here is my changed pbix file:
Best Regards,
Giotto Zhi
Anonymous
6 years agoNot applicable
Thank you for you help but requirement has changed and this isn't needed any more. The output i was looking for is as below. Also, legend needs to show the category names
Anonymous
6 years agoNot applicable
- v-gizhi-msft6 years agoCommunity Support
Hi,
Please try to create this table first:
Table = UNION(DISTINCT('WorkData'[Category]),{{"MaxCount"}})Then try this measure:
Measure = SWITCH(SELECTEDVALUE('Table'[Category]),"MaxCount",MAX('GroupData'[MaxCount]),CALCULATE(SUM(WorkData[Count]),FILTER('WorkData','WorkData'[Category] in DISTINCT('Table'[Category]))))The result shows:
Here is my changed pbix file:
Best Regards,
Giotto Zhi
- v-gizhi-msft6 years agoCommunity Support
Hi,
If my answer has solved your issue, please mark it as a solution for others to see.
Thanks!
Best Regards,
Giotto Zhi