Forum Discussion
How to show only subtotal value
I have a table that contains Country, State, Target Regions and number of dairy cows.
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.
Any suggestions?
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] ) )
4 Replies
- CoreyP
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] ) )
- BhaktisheteNew Member
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]))
- DJSwezey
Helper I
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.
- DJSwezey
Helper I
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