Forum Discussion

pk32's avatar
pk32
New Member
4 years ago
Solved

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...
  • Anonymous's avatar
    Anonymous
    4 years ago

    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