Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, i have multiple conditions, how is this doable in power bi?
IF
([SCHEDULE_SHIP_DATE] < TODAY() OR [SCHEDULE_SHIP_DATE] < TODAY() + 2)
THEN 'Today'
ELSEIF ([SCHEDULE_SHIP_DATE] < TODAY() OR
[SCHEDULE_SHIP_DATE] < TODAY() + 2 OR
[SCHEDULE_SHIP_DATE] < TODAY() + 6)
THEN 'N5D'
ELSEIF ([SCHEDULE_SHIP_DATE] < TODAY() + 13)
THEN 'N2W'
END
Hi @Anonymous ,
You could try SWITCH() function.
https://docs.microsoft.com/en-us/dax/switch-function-dax
However, the second condition look wired.
([SCHEDULE_SHIP_DATE] < TODAY() OR [SCHEDULE_SHIP_DATE] < TODAY() + 2) could be both "Today" and "N5D"?
Best Regards,
Jay
Hi @Anonymous ,
You can use below code:-
column =
IF (
OR ( [SCHEDULE_SHIP_DATE] < TODAY (), [SCHEDULE_SHIP_DATE] < TODAY () + 2 ),
"Today",
IF (
OR (
[SCHEDULE_SHIP_DATE] < TODAY (),
OR (
[SCHEDULE_SHIP_DATE]
< ( TODAY () + 2 ),
[SCHEDULE_SHIP_DATE]
< ( TODAY () + 6 )
)
),
"N5D",
IF ( [SCHEDULE_SHIP_DATE] < ( TODAY () + 13 ), "N2W" )
)
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
hi @Samarth_18 the formula you suggested seems to not be working on the output i desire.
this formula:
is actually the reference to be used, i want to modify that formula into a new classification:
New Column (DESIRED OUTPUT):
N5D will cover all "Backlog" , "N5D", "Today"
Today will cover "Backlog","Today"
Future will be "N2W"
For your first condition i.e. N5D will cover all "Backlog" , "N5D", "Today", if SSD = N5D then it will show N5D but it will show N5D for backlog and today as well since we have applied OR condition. N5D and Today cant go in parellel in such case. Could you please check if we are missing any other condition?
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |