Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
The sample table:
Group | Date | Sales |
A | Dec | 100 |
A | Jan | 100 |
A | Feb | 100 |
A | Mar | 100 |
B | Jan | 100 |
B | Feb | 100 |
B | Mar | 100 |
The slicer applied:
I want the table to look like:
Group | Date | Sales | GroupTotal |
A | Jan | 100 | 200 |
A | Feb | 100 | 200 |
B | Jan | 100 | 200 |
B | Feb | 100 | 200 |
the Group total representing the subtotal by group.
A = CALCULATE( SUM('Table'[Sales]),ALLSELECTED())
Group | Date | Sales | A |
A | Jan | 100 | 400 |
A | Feb | 100 | 400 |
B | Jan | 100 | 400 |
B | Feb | 100 | 400 |
this gets the total for everything that is not filterred out not a subtotal fro each group though.
B=CALCULATE(SUM('Table'[Sales]),ALLEXCEPT('Table','Table'[Date]))
Group | Date | Sales | B |
A | Jan | 100 | 400 |
A | Feb | 100 | 400 |
B | Jan | 100 | 300 |
B | Feb | 100 | 300 |
this gets a subtotal for each group. This subtotal includes data that was filtered out.
How can I do both?
Hi @v-jacogs,
You could try to create the measure below to get your excepted output.
Group_total = CALCULATE ( SUM ( test[Sales] ), ALLSELECTED ( test[Group] ) )
Then you will get the result.
In addition, you could create the Matrix visual and get the Subtotal simply as below.
Hope it can help you!
Best Regards,
Cherry
I have the same problem, and your solution seems not working for me...
Could you take a look and find why, please?
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
71 | |
70 | |
50 | |
46 |
User | Count |
---|---|
46 | |
38 | |
29 | |
28 | |
28 |