Forum Discussion

Pwilson460's avatar
Pwilson460
New Member
2 years ago
Solved

Simple IF statement returning incorrect results

Hello all, 

 

I am pretty new to DAX but have spent a lot of time using excel. 

 

I created this simple measure to allow users to filter a report for line items that are showing a negative balance by using a slicer. 

 

HighRisk_Under0 = IF(  AR[Cash-NetSales]  > 0 ,"Low Risk","High Risk")
 

The AR[Cash-NetSales] measure is just what it sounds like, current cash minus current net sales, and that measure works perfectly. 

 

However when I select the "High Risk" check box on my newly created slicer it shows some lines in the visual with a positive value, I am expecting it to only show negative values.

 

What am I missing here?

 

Thanks so much 

 

  • Ritaf1983's avatar
    Ritaf1983
    2 years ago

    Hi Pwilson460 
    I replicated your scenario and it works as it should :

    The pbix is attached, you can follow my steps

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

     

5 Replies