Forum Discussion
How to calculate a yes/no (binary) variable from date variable
I have a date variable where I want to create a new variable where IF date IS NOT Null THAN "YES' ELSE IF "NO"
I tried to use DAX create this variable by creating a new column this is what I have
Criteria = IF('Base Population Summary'[Date (11/17)].[Date]null,"NO","YES")
Base Population Summary = Data Tab
Date (11/17) = Date Variable
What is the correct way to write this custom variable?
Thanks
~Bryon
This worked with just a tweak: Thanks!!!
IF('Base Population Summary'[Date (11/17)].[Date]=BLANK(),"Yes","No")
- Anonymous8 years ago
NO problem, can you please mark it as resolved.?
3 Replies
- AnonymousNot applicable
Can you try this?
if (Base Population Summary'[Date (11/17)].[Date]=BLANK(),''Yes","No")
Thanks
Aditya
- Bbrown44Advocate II
This worked with just a tweak: Thanks!!!
IF('Base Population Summary'[Date (11/17)].[Date]=BLANK(),"Yes","No")
- AnonymousNot applicable
NO problem, can you please mark it as resolved.?