Forum Discussion

OSS's avatar
OSS
Helper III
7 years ago
Solved

total sum problem

Dear all

I want to calculate column with condition. My condition is 

Exp = if([Income]>0,[Income],0). However at the end, the sum of the columns doesn't change. I need correct sum for the exp column in order to calculate weight of each customer.
Please help me with this issue

  • Hi OSS 

    Create measures

    Measure = IF(SUM(Sheet4[income])>0,SUM(Sheet4[income]),0)
    
    Measure 2 = SUMX(ALL(Sheet4),[Measure])
    
    Measure 3 = IF(HASONEVALUE(Sheet4[customer no]),[Measure],[Measure 2])

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi OSS 

    Create measures

    Measure = IF(SUM(Sheet4[income])>0,SUM(Sheet4[income]),0)
    
    Measure 2 = SUMX(ALL(Sheet4),[Measure])
    
    Measure 3 = IF(HASONEVALUE(Sheet4[customer no]),[Measure],[Measure 2])

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.