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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Switch/If statement for number values

Hey guys, my brain is melting trying to configure a large "x is greater than y, but less than z" statement with multiple parameters 😫 Could someone help get me started please?

 

What I'm trying to configure is:

 

if column A is less than or equal to 9.99, result 1,

if column A is greater than or equal to 10.00 but less than or equal to 19.99, result 2,

if column A is greater than or equal to 20.00 but less than or equal to 39.99, result 3 (and so on!)

2 ACCEPTED SOLUTIONS
zenisekd
Super User
Super User

You do not need the second parameter in the condition line, just use
if <10 then 1
if <20 then 2
if <40 then 3
else 4

Kudos and mark as solution appreciated.

View solution in original post

Einomi
Helper V
Helper V

Try to add a custom column

 

if [Column A] <= 9.99 then 1 
            else if [Column A] >= 10.00 and [Column A] <= 19.99 then 2 
            else if [Column A] >= 20.00 and [Column A] <= 39.99 then 3 else null

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you both! 

Einomi
Helper V
Helper V

Try to add a custom column

 

if [Column A] <= 9.99 then 1 
            else if [Column A] >= 10.00 and [Column A] <= 19.99 then 2 
            else if [Column A] >= 20.00 and [Column A] <= 39.99 then 3 else null

 

 

zenisekd
Super User
Super User

You do not need the second parameter in the condition line, just use
if <10 then 1
if <20 then 2
if <40 then 3
else 4

Kudos and mark as solution appreciated.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Kudoed Authors