Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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 July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
61 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
86 | |
61 | |
45 | |
41 | |
39 |