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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.