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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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?
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 39 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 144 | |
| 106 | |
| 63 | |
| 38 | |
| 31 |