Forum Discussion
DAX - multiple conditions
- 9 years ago
I guess it works fine now in this version
Status = IF(Query1[BonusAmount] = 0 || Query1[BonusLeft] < 0 || Query1[EndDate] < TODAY() && Query1[EndDate] <> BLANK(); "CLOSED"; "active")
Am I right?
Ups.
If the EndDate is blank, it should be seen as EndDate > TODAY
I guess it works fine now in this version
Status = IF(Query1[BonusAmount] = 0 || Query1[BonusLeft] < 0 || Query1[EndDate] < TODAY() && Query1[EndDate] <> BLANK(); "CLOSED"; "active")
Am I right?
- Baskar9 years agoResident Rockstar
Status =if ( Isblank(Query1[EndDate]) , "Active", IF(Query1[BonusAmount] = 0 || Query1[BonusLeft] < 0 || Query1[EndDate] < TODAY(), "CLOSED", "Active"))
Try this this will help u
- kjaworski9 years agoRegular Visitor
Thanks a lot! It works
- C4YNelis9 years agoAdvocate III
Hi kjaworski,
I'm guessing something went wrong with my earlier reply, as I cannot see it in the topic, however, if I'm mistaken, forgive me for the double post.
I just wanted to add to the previous solution. I added a small nuance to the formula, as you have a mistake when the BonusLeft value = 0. I believe you wanted to set this value to "Closed", but right now it might still remain "Active".
status = IF(Query1[BonusAmount] = 0 || Query1[BonusLeft] <= 0 || (Query1[EndDate] < TODAY() || Isblank(Query1[EndDate]));"Closed";"Active")
Best regards,
Niels