Forum Discussion

ankit_cd's avatar
ankit_cd
Regular Visitor
4 years ago
Solved

How to plot values that aggregates average only for non-zero values?

A particular category has 5 sub-categories. After a particular year, only 3 sub-categories are active. I am trying to plot different metrics such as quality, efficiency, charges, etc. in different li...
  • Anonymous's avatar
    Anonymous
    4 years ago

    HI ankit_cd,

    Did you mean to prevent the aggregation calculation on zero and negative values?
    If that is the case you can write a measure formula with the filter on the table to exclude the negative values.

    formaul =
    CALCULATE (
        SUM ( Table[Amount] ),
        FILTER ( ALLSELECTED ( Table ), [Amount] >= 0 ),
        VALUES ( Table[Category] )
    )

    Regards,

    Xiaoxin Sheng