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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Dee
Helper III
Helper III

Compare greater than 0 but less than 2 in dax using IF statement

Hi all,

 

I would love to do a comparison that checks if the value in a column is greater than 0 but less than 2,

 

eg

IF( A[BBB]>0 AND <= 2, "RRR", " NNN), "000)

 

Any idea how I can tweak that for it not to throw an error.

 

 

1 ACCEPTED SOLUTION
Gordonlilj
Solution Sage
Solution Sage

Hi,

 

Something like this should work:

 

IF( Table[column] > 0 && Table[column] <=2,"ResultTrue","ResultFalse")

or if you want to use switch:

SWITCH(TRUE(),Table[column] > 0 && Table[column] <=2,"ResultTrue","ResultFalse") 

View solution in original post

2 REPLIES 2
Gordonlilj
Solution Sage
Solution Sage

Hi,

 

Something like this should work:

 

IF( Table[column] > 0 && Table[column] <=2,"ResultTrue","ResultFalse")

or if you want to use switch:

SWITCH(TRUE(),Table[column] > 0 && Table[column] <=2,"ResultTrue","ResultFalse") 

Thank you!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors