Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
justinMcC
Frequent Visitor

DAX to get group total

Hi,

 

I am using a matrix table to represent product sales by category. I am using measures to calculate treatment courses an treatment days.

 

 

purchases.JPG

 

My issue is that the Sub Totals for group don't show the sum of the above rows but actually applies the calculations in measures to determine sub total.

 

The meausres I have created to get column4 figures are as follows:

 

 measure = SUM(transactions[sales] / ([measure2] / MIN(clinical_number)) 

 

In this instance measure2 = 200

 

Thanks for your help

 

 

 

1 ACCEPTED SOLUTION
muchinski
Resolver II
Resolver II

Can you explain better your example?

I can't identify transactions[sales] or MIN(clinical_number) or even know the calculation you use for [measure2].

 

In any case, just to save some time here. If Miscellaneous is you [category] and the drill is [product], the for you to have the value of the parent group, you can use the ALLSELECTED function. See the sample bellow:

 

Total for Category = 
CALCULATE([measure2], ALLSELECTED('MyTable'[product]))

 

View solution in original post

1 REPLY 1
muchinski
Resolver II
Resolver II

Can you explain better your example?

I can't identify transactions[sales] or MIN(clinical_number) or even know the calculation you use for [measure2].

 

In any case, just to save some time here. If Miscellaneous is you [category] and the drill is [product], the for you to have the value of the parent group, you can use the ALLSELECTED function. See the sample bellow:

 

Total for Category = 
CALCULATE([measure2], ALLSELECTED('MyTable'[product]))

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.