Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Bbrown44
Advocate II
Advocate II

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

2 ACCEPTED SOLUTIONS

This worked with just a tweak:  Thanks!!!

 

IF('Base Population Summary'[Date (11/17)].[Date]=BLANK(),"Yes","No")

View solution in original post

Anonymous
Not applicable

NO problem, can you please mark it as resolved.?

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Can you try this?

 

if (Base Population Summary'[Date (11/17)].[Date]=BLANK(),''Yes","No")

 

Thanks

Aditya

 

 

 

This worked with just a tweak:  Thanks!!!

 

IF('Base Population Summary'[Date (11/17)].[Date]=BLANK(),"Yes","No")

Anonymous
Not applicable

NO problem, can you please mark it as resolved.?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.