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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
I've been struggling to find a solution for my problem.
Below is the simplified data sample of what I'm trying to do.
Chain | StoreID | Item | Question | Target | Actual |
Tesco | T1 | A | A1 | 1 | 1 |
Tesco | T1 | A | A2 | 1 | 0 |
Tesco | T1 | A | A3 | 1 | 1 |
Tesco | T2 | A | A1 | 1 | 1 |
Tesco | T2 | A | A2 | 1 | 1 |
Tesco | T2 | A | A3 | 1 | 1 |
Tesco | T1 | B | B1 | 1 | 1 |
Tesco | T1 | B | B2 | 1 | 1 |
Tesco | T1 | B | B3 | 1 | 1 |
Tesco | T2 | B | B1 | 1 | 0 |
Tesco | T2 | B | B2 | 1 | 0 |
Tesco | T2 | B | B3 | 1 | 0 |
Lidl | L1 | A | A1 | 1 | 1 |
Lidl | L1 | A | A2 | 1 | 1 |
Lidl | L1 | A | A3 | 1 | 1 |
Lidl | L2 | A | A1 | 1 | 1 |
Lidl | L2 | A | A2 | 1 | 1 |
Lidl | L2 | A | A3 | 1 | 1 |
Lidl | L1 | B | B1 | 1 | 1 |
Lidl | L1 | B | B2 | 1 | 1 |
Lidl | L1 | B | B3 | 1 | 1 |
Lidl | L2 | B | B1 | 1 | 0 |
Lidl | L2 | B | B2 | 1 | 0 |
Lidl | L2 | B | B3 | 1 | 0 |
I'm trying to use matrix visualization to get something like this:
Where Chain, Item, and Questions are rows of the matrix. The values of Target and Actual on the Question level are simply the sum of Target and Actual from the table. However, I want the Target and Actual on the Item level to be the number of stores that have all-hit (A1, A2, and A3 are equal to 1, etc) for that particular item. Whereas the Target and Actual on the Chain level to be the sum of Target and Actual on the Item level.
If I just drag fields to matrix visualization without using custom measure, it looks like below, which is not something I'm looking for.
My idea is to groupby based on StoreID and do sum aggregate on the Target and Actual, and then countif the Actual = Target, but I don't know how to do this using DAX.
Does anyone have a solution for this?
Thank you!
Solved! Go to Solution.
@Anonymous First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
Also, I think this specifically will help: Matrix Measure Total Triple Threat Rock & Roll - Microsoft Power BI Community
@Anonymous First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
Also, I think this specifically will help: Matrix Measure Total Triple Threat Rock & Roll - Microsoft Power BI Community