Forum Discussion
alecsonline
7 years agoHelper I
Stupid question about dates filtering using OR
Hi all, I already know it is a stupid question for you.... but not for me!
As per image below I have a column were a Cancellation is shown, if the item has been cancelled, or it is empty if the item is active.
I need to show the situation of the items that were still "active" on a certain date, for example reading the situation on 19/08/2018 I have to tell to PowerBI:
count the lines that have "DATACXLREALE" >19/08/2018 OR that have that field empty.
So the question is: how should I write the FILTER formula in order to translate the "OR" in DAX formulas?
In excel it would be OR(DATACXLREALE>19/08/2018; DATACXLREALE="")
Thank you very much in advance, Alessandro
As per image below I have a column were a Cancellation is shown, if the item has been cancelled, or it is empty if the item is active.
I need to show the situation of the items that were still "active" on a certain date, for example reading the situation on 19/08/2018 I have to tell to PowerBI:
count the lines that have "DATACXLREALE" >19/08/2018 OR that have that field empty.
So the question is: how should I write the FILTER formula in order to translate the "OR" in DAX formulas?
In excel it would be OR(DATACXLREALE>19/08/2018; DATACXLREALE="")
Thank you very much in advance, Alessandro
- Anonymous7 years ago
alecsonline its the same way
Result = IF(OR(DATACXLREALE>19/08/2018; DATACXLREALE=""),STATOREALE1)
and then you can distinctcount the result column
Here is the DAX UG for that.
https://msdn.microsoft.com/en-us/query-bi/dax/or-function-dax
1 Reply
- AnonymousNot applicable
alecsonline its the same way
Result = IF(OR(DATACXLREALE>19/08/2018; DATACXLREALE=""),STATOREALE1)
and then you can distinctcount the result column
Here is the DAX UG for that.
https://msdn.microsoft.com/en-us/query-bi/dax/or-function-dax