Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have two groups of data Group A and Group B where I need to get the percent of categories based on the total responses for each. There are multiple categories within each group all by the same name. I want to be able to display the correct % of categories for each group in one graph AND have it be able to connect back to my main data table in which other data on a page can interact with it.
I have tried making two separate tables for the groups and doing my measure for each which is fine, but then I need essentially an attribute key table in order to have the percentages for both groups to display correctly (since you can only put one attribute into the graph visual obviously). In doing this, then I cannot make a both way connection back to my main data table for both the group tables, it only allows for one both way connection at a time because of the key connected I am assuming.
I have also tried merging the data together but the dax I would normally use for just one grouping of data does not work right. Mainly because there is not equal responses across the groups they have their individual response totals.
Here is my dax: %Percent of cases = DIVIDE(COUNTA(Table[Value]), CALCULATE(DISTINCTCOUNT(Table[ID]), ALLSELECTED(Table)))
What would be a solution to this? Am I merging them wrong? Am I connecting them wrong in the web? How could I update my dax to only reflect the response total per group A and B? The distinctcount for the ID column and the allselected are what I believe are wrong here I just don't know how to update it for my needs.
Here is example data as one table:
ID | Attribute | GroupA | GroupB |
R1 | Benefit1 | 1 | 1 |
R2 | Benefit1 | 1 | |
R3 | Benefit1 | 1 | 1 |
R4 | Benefit1 | 1 | |
R5 | Benefit2 | 1 | 1 |
R6 | Benefit2 | 1 | 1 |
R7 | Benefit2 | 1 | 1 |
R8 | Benefit3 | 1 | 1 |
R9 | Benefit3 | 1 | 1 |
R10 | Benefit4 | 1 | |
R11 | Benefit5 | 1 | 1 |
R12 | Benefit5 | 1 | 1 |
R13 | Benefit5 | 1 | 1 |
R14 | Benefit6 | 1 | |
R15 | Benefit6 | 1 |
Solved! Go to Solution.
Hi @agalbraith ,
1. You can use the small multiples to split a visual into multiple versions of itself.
GroupA% =
DIVIDE (
CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[GroupA] = 1 ),
COUNTX ( ALL ( 'Table' ), 'Table'[ID] )
)
GroupB% =
DIVIDE (
CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[GroupB] = 1 ),
COUNTX ( ALL ( 'Table' ), 'Table'[ID] )
)
2. Or unpivot [GroupA] and [GroupB], then create the measure.
Measure =
DIVIDE (
DISTINCTCOUNT ( 'Table (2)'[ID] ),
CALCULATE ( DISTINCTCOUNT ( 'Table (2)'[ID] ), ALL ( 'Table (2)' ) )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @agalbraith ,
1. You can use the small multiples to split a visual into multiple versions of itself.
GroupA% =
DIVIDE (
CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[GroupA] = 1 ),
COUNTX ( ALL ( 'Table' ), 'Table'[ID] )
)
GroupB% =
DIVIDE (
CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[GroupB] = 1 ),
COUNTX ( ALL ( 'Table' ), 'Table'[ID] )
)
2. Or unpivot [GroupA] and [GroupB], then create the measure.
Measure =
DIVIDE (
DISTINCTCOUNT ( 'Table (2)'[ID] ),
CALCULATE ( DISTINCTCOUNT ( 'Table (2)'[ID] ), ALL ( 'Table (2)' ) )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.