Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

If statement help - inserting a range

Hi all,
 
I'm looking to add a range to my If statement below, but I'm struggling. Any help would be appreciated!
 
I need to mark a "1" in a column that contains a number higher than -12 but lower than 1. 
 
Current code is: "SRC sent within 3 day (1/0) = IF('MGA - Complaints (SCANS)'[SRC Difference] (INSERT RANGE BETWEEN -12 & 0) ,1,blank())"
 
Kind regards,
 
Jordan
  • I think this is what you want. Change the signs to >= and <= if you want to include -12 and 0

     

    Measure =
    IF(
        'MGA - Complaints (SCANS)'[SRC Difference] > -12
            && 'MGA - Complaints (SCANS)'[SRC Difference] < 0,
        1,
        BLANK()
    )
    

     

2 Replies

  • Anonymous 

    Give this a try.

    SRC sent within 3 day (1/0) = IF('MGA - Complaints (SCANS)'[SRC Difference] >= -12 && 'MGA - Complaints (SCANS)'[SRC Difference] <= 0, 1, blank())

     

  • edhans's avatar
    edhans
    Community Champion

    I think this is what you want. Change the signs to >= and <= if you want to include -12 and 0

     

    Measure =
    IF(
        'MGA - Complaints (SCANS)'[SRC Difference] > -12
            && 'MGA - Complaints (SCANS)'[SRC Difference] < 0,
        1,
        BLANK()
    )