Forum Discussion

samil01's avatar
samil01
Frequent Visitor
3 years ago
Solved

Subtract Negative Values ​​From Positive Values

Hi everyone,   Hopefully someone can help me out with my issue here, I have a condition for a measure. If sales type equal to 1 then i do want to do nothing but if its not equal to 1 i want to valu...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi samil01 

    You can try the following measure

    Total =
    IF (
        [Calculated Gross Amount] > 0,
        SUMX (
            FILTER ( dwh_invoice_header, [Calculated Gross Amount] > 0 ),
            [Calculated Gross Amount]
        ),
        [Calculated Gross Amount]
    )
    

     

    Best Regards!

    Yolo Zhu

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