Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have created a cluster bar chart which has the color counts on one axis, color categories on another axis, and the bars are symbolized according to name (picture below).
I would like to have data labels in each bar that show the % proportion of each bar's count against the grand total of counts across all categories.
For example, for Alice's Blue bar, I would like the bar to have a data label of 11% (since that bar shows a count of 1, and the grand total across all category counts is 9; 1/9); Marks' Blue bar should have a label of 44% (4/9), etc.
I would like to achieve this using a measure, and have been playing around with different measures, but I think what I'm having trouble with is understanding how a measure stores values.
For example, I can really easily visualize creating a summary table, which I've done using dax and power query, which would give me a simpe table of grouped values and their respective counts. But I'm having trouble visualizing how a measure can be used instead of a table to run calculations for categories and subcategories.
I think I have to do the following:
1. Get total count of all rows (to use as a denominator for calculating the proportions). ex: var totalcount = COUNTROWS(table)
2. Get counts across two categories -- names and colors
3. Divide counts of values against total row count. ex: var proportions = DIVIDE(counts, totalcount)
I think what I'm struggling with is number 2 -- getting counts across two categories and understanding how this is done.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
89 | |
87 | |
81 | |
64 | |
49 |
User | Count |
---|---|
123 | |
109 | |
88 | |
68 | |
67 |