Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am using power BI for the first time and I am struggling a bit to write an IF function. Idea is very basic, I need to check a cell value (days overdue) and then return a corresponding text.
Solved! Go to Solution.
AgingBucket = IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<0,"not due", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<61,"61-90", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<61, "61-90", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<121,"91-120", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<151,"121-150", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<181,"151-180", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<366,"181-365", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])>365,"1+Years" WE NEED ELSE STATEMENT HERE )))))))))))))
Missing else on the last IF and missing ")" on a few IF's.
Hi, look at the last IF...
AgingBucket = IF([LOOKUP] ('As of 6 30 2019'[Days Overdue] )<0,"not due",IF([LOOKUP] ('As of 6 30 2019'[Days Overdue] )<61,"61-90", IF([LOOKUP]('As of 6 30 2019'[Days Overdue] )<61, "61-90",IF([LOOKUP]('As of 6 30 2019'[Days Overdue]<121,"91-120",IF([LOOKUP]('As of 6 30 2019'[Days Overdue]<151,"121-150",IF([LOOKUP]('As of 6 30 2019'[Days Overdue]<181,"151-180",IF([LOOKUP]('As of 6 30 2019'[Days Overdue]<366,"181-365",IF([LOOKUP]('As of 6 30 2019'[Days Overdue]>365,"1+Years","second parameter")))))))))))))
Regards.
You havent closed the lookups. They need to be closed with a ")". Take a look at my previous comment!
AgingBucket = IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<0,"not due", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<61,"61-90", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<61, "61-90", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<121,"91-120", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<151,"121-150", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<181,"151-180", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])<366,"181-365", IF( [LOOKUP]('As of 6 30 2019'[Days Overdue])>365,"1+Years" WE NEED ELSE STATEMENT HERE )))))))))))))
Missing else on the last IF and missing ")" on a few IF's.
Thank you so much! Works just fine now 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |