Forum Discussion
dbtornell
8 years agoFrequent 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 d...
- Anonymous8 years ago
Based on my test, we can use the steps below in power bi.
- Enter a list of sample data in power bi desktop.
- 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:
For more information, please check the pbix as attached.
Regards,
Lydia
Anonymous
8 years agoNot applicable
Based on my test, we can use the steps below in power bi.
- Enter a list of sample data in power bi desktop.
- 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:
For more information, please check the pbix as attached.
Regards,
Lydia