Forum Discussion
kjaworski
9 years agoRegular Visitor
DAX - multiple conditions
Hello I'm trying to do simple filtering using multiple conditions. At least I thought it would be easy. Here are the columns: Amount AmountLeft EndDate status 100 50 2016.12.3...
- 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?
kjaworski
9 years agoRegular Visitor
Thanks a lot! It works
C4YNelis
9 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