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
dbtornell
Frequent Visitor

IF Statement with multiple criteria

I have the following IF statement in Excel "=IF(D2<14,"(1)  <14 day",IF(D2<21,"(2)  14-21 days",IF(D2<30,"(3)  21-30 days",IF(D2<45,"(4)  30-45 days",IF(D2<60,"(5)  45-60 days",IF(D2<90,"(6)  60-90 days",IF(D2<120,"(7)  90-120 days","(8)  >120 days")))))))". How would I go about creating this statement in PowerBI?

 

Thanks,

David

1 ACCEPTED SOLUTION
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

 

@dbtornell,

 

Based on my test, we can use the steps below in power bi.

 

  1. Enter a list of sample data in power bi desktop.
  2. New a column and enter the formula as below:

 

 

Column = IF(Table1[test]<14, "(1) <14day",IF(Table1[test]<21, "(2) 14-21 days",IF(Table1[test]<31, "(3) 21-30 days", IF(Table1[test]<46, "(4) 30-45 days",IF(Table1[test]<61,"(5) 45-60 days",IF(Table1[test]<91, "(6) 60-90 days",IF(Table1[test]<121, "(7) 90-120 days", IF(Table1[test]>120, "(8) >120 days"))))))))

 

Then we can get the result showing the statement:

 1.PNG

 

For more information, please check the pbix as attached.

 

 

Regards,

Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

 

@dbtornell,

 

Based on my test, we can use the steps below in power bi.

 

  1. Enter a list of sample data in power bi desktop.
  2. New a column and enter the formula as below:

 

 

Column = IF(Table1[test]<14, "(1) <14day",IF(Table1[test]<21, "(2) 14-21 days",IF(Table1[test]<31, "(3) 21-30 days", IF(Table1[test]<46, "(4) 30-45 days",IF(Table1[test]<61,"(5) 45-60 days",IF(Table1[test]<91, "(6) 60-90 days",IF(Table1[test]<121, "(7) 90-120 days", IF(Table1[test]>120, "(8) >120 days"))))))))

 

Then we can get the result showing the statement:

 1.PNG

 

For more information, please check the pbix as attached.

 

 

Regards,

Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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