Forum Discussion

Sirhawk3017's avatar
Sirhawk3017
Helper II
2 years ago
Solved

Matrix Not Totaling - Only Show Negative Values

Hello,

 

I'm trying to create a measure that only shows negative values in a matrix. It works but it won't total in the matrix total. The variance formula pulls from two different tables. The weird thing is if I flip the sign to > it shows and totals the positive values.

 

 

 

Sales YTD Show Negative = if([AMS_ISN_$_Variance]<0,[AMS_ISN_$_Variance],blank())

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Thanks for the reply from mickey64 , please allow me to provide another insight:

    Hi, Sirhawk3017 

    Regarding the issue you raised, my solution is as follows:

    First I have created the following table and the column names and data are the data you have given:

    I offer you two solutions:

    1.The first converts a measure into a calculated column:

    Then modify the position of the following image:
     

    2.Second, you can modify your measure to:

    SUMX (
        FILTER ( 'Table', [AMS_ISN_$_Variance] < 0 ),
        'Table'[AMS_ISN_$_Variance]
    )
    

    3.Here's my final result, which I hope meets your requirements.

    Please find the attached pbix relevant to the case.

     

    Best Regards,

    Leroy Lu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


     

6 Replies