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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

DAX for empty date column

Hi, 

 

I have a data set with a date column (DD.MM.YYYY), a year column and a quarter column. 

I want to primarily use the date column for time intelligence. However, some rows in the date column are empty. The year (i.e. 2022) and quarter (i.e. 1,2 etc) columns always have data. 

 

Therefore, I want to link to year and quarter columns in the instance where the date columns are empty, to create an artifical date (i.e. 31.03.2022 for Q1, 2022) .

I was considering doing this via an IF Statement with multiple conditions? What do you suggest?

 

Thank you for your help!

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

To create a new column, use:

column = IF ([Date] = blank (), the Date (2022,3,31), [Date])


If you have a lot of conditions, you can also use switch.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

SpartaBI
Community Champion
Community Champion

@Anonymous 
If you have blank rows in your date table than this is not a proper date table and you won't be able use time intelligence with it. You need to clean your data before you bring it to the model.

Check this for a good reference for a simple date table:
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.