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?
C4YNelis
9 years agoAdvocate III
I think you want to write it like this:
status = If(Query1[BonusAmount] = 0 || Query1[BonusLeft] <= 0 || (Query1[EndDate] < TODAY() || Isblank(Query1[EndDate])),"Closed","Active")
It's a subtle difference, but otherwise you might still see the wrong lines when your BonusLeft ends up 0. (this scenario was not present in your sample data).
Best Regards,
Niels