Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

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
1 ACCEPTED SOLUTION
edhans
Community Champion
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()
)

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
edhans
Community Champion
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()
)

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
jdbuchanan71
Super User
Super User

@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())

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.