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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
DJSwezey
Helper I
Helper I

How to show only subtotal value

I have a table that contains Country, State, Target Regions and number of dairy cows.

DJSwezey_1-1702330956842.png

 

I do not want to see the number of dairy cows per each target region (last drill down row). I only want to see totals for State and for Country.

DJSwezey_2-1702331087925.png

 

Any suggestions?

 

1 ACCEPTED SOLUTION
CoreyP
Solution Sage
Solution Sage

Option 1, don't use target region in your visual. Option 2, write a DAX measure to only sum when it's not in context of target region. Something like Dairy Cows = IF( ISFILTERED( [Target Region] ) , BLANK() , SUM( [Dairy Cows] ) )

View solution in original post

4 REPLIES 4
CoreyP
Solution Sage
Solution Sage

Option 1, don't use target region in your visual. Option 2, write a DAX measure to only sum when it's not in context of target region. Something like Dairy Cows = IF( ISFILTERED( [Target Region] ) , BLANK() , SUM( [Dairy Cows] ) )

This works great with only one acception: now I have nothing to drill down onto. When I use the measure as my value I cannot drill down into a Target Region

 

Create a measure to calculate the total number of dairy cows for each state. Use the following DAX measure:

Total Dairy Cows = SUM('YourTable'[Number of Dairy Cows])

Create a measure to calculate the total number of target regions for each state. Use the following DAX measure:

Total Target Regions = COUNTROWS(VALUES('YourTable'[Target Regions]))

Im not sure what this is solving for?

If I am using a measure as my value for number of Dairy Cows and Beef Cows then I cannot drill down to the Target Region by State.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.