Forum Discussion

mmparvez's avatar
mmparvez
Frequent Visitor
2 years ago
Solved

Zero value as average

I have a table 

Which i want to show as Visualisation Table with zero value as average per product catagory.

Expected visualization 

 

3 Replies

  • use if condition to achive this.

    here is example:
    AverageAmount =
    IF(
    SUM('YourTable'[Amount]) = 0,
    AVERAGE('YourTable'[Amount]),
    SUM('YourTable'[Amount])
    )

  • Follow steps:

    1. Replace Value '0' to 'null'. 

    2. Create a New Measure 

     

    Measure = IF( SUM('Table'[Value]) = 0, CALCULATE(AVERAGEA('Table'[Value]), REMOVEFILTERS('Table'[Customer])), SUM('Table'[Value]) );