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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
pk32
New Member

Different Drill down/drill up Subtotal Calculation in Matrix

I need Product to caluclate Avg of the months when they have values in them. As so, Handheld should read .186 when I drill up instead it sums up everything to .93(Aka sum). But I need my YearMonth to sum the expense which it is doing correctly. I've seen the hasonevalue/filter & ifinscope within the community, but never could get it to work.

 

pk32_0-1657662925613.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pk32 ,

 

You could use ISINSCOPE() or ISFILTERED() function.

create a new measure like below:

measure =
IF (
    ISINSCOPE ( [hierarchy] ),
    [value],
    SUMX ( ALLEXCEPT ( 'table', [hierarchy] ), [value] )
)

It will return sum of row values at subtotal.

 

Best Regards,

Jay 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @pk32 ,

 

You could use ISINSCOPE() or ISFILTERED() function.

create a new measure like below:

measure =
IF (
    ISINSCOPE ( [hierarchy] ),
    [value],
    SUMX ( ALLEXCEPT ( 'table', [hierarchy] ), [value] )
)

It will return sum of row values at subtotal.

 

Best Regards,

Jay 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

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.