March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
The current SQL dataset I am working on has several null or blank entries under one of my date columns as they technically have no set end date for their project completion. I am working on Gannt chart visual. However, since some items are blank or null nothing is rendered for these items on the visual. My intent is to create a new column that will copy the valid values for the end date column, and replace any blanks or nulls with a value set five years out from todays date or Jan 1 of whatever the current year is. I also want to ensure that should a value be added later on in the SQL database that once I refresh my report it will include the new date and not hold on to the previous date stamp. Does anyone know if this is possible or perhaps if there is an easier method of doing this?
Solved! Go to Solution.
It is possible like you said in DAX in the model.
It's also possible in Power Query to replace null with whatever value or add a column to check like in the model with DAX. In Power Query you got GUI for these operations.
The best options is alwyas to push it as back as you can to the the data source, as in do the change there in a view.
But all options are valid and possible.
In dax, you just need to create a new cloumn like:
IF(
isblank('your_table'[your_date_cloumn]),
today(),
'your_table'[your_date_column]
)
It is possible like you said in DAX in the model.
It's also possible in Power Query to replace null with whatever value or add a column to check like in the model with DAX. In Power Query you got GUI for these operations.
The best options is alwyas to push it as back as you can to the the data source, as in do the change there in a view.
But all options are valid and possible.
In dax, you just need to create a new cloumn like:
IF(
isblank('your_table'[your_date_cloumn]),
today(),
'your_table'[your_date_column]
)
This is great thanks for the help . This is really really close. It created a new column no problem. It copied all the good data from the first column over perfectly. It entered a value for any nulls or missing data, awesome. The only thing missing now is that it set all the nulls to today. Do you know what the syntax would be to push it out 5 years or realistically any specified allotment of time? Once again thanks for the help so far I really appreciate it.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
12 | |
9 | |
7 |
User | Count |
---|---|
38 | |
32 | |
28 | |
12 | |
11 |