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
Hi,
I wrote an if statement based DAX to create a new column but it is not working for all the cells in the calculated column.
I create the Lost Date column in the image below based on an if condition on the adjacent column. I f you see the last row in the image should also have a value but it is blank. could someone help me to solve this issue?
Thanks in advance
Ruban
Solved! Go to Solution.
hi, @ruban
Use Date () Function needs to consider the leap year condition, that may be a bit complex.
You could try this simple way:
use CALENDAR() to create a wider range date table
for example:
Date = CALENDAR(MIN(Table1[procdate])-549,MAX(Table1[procdate])+549)
Then create the relationship between date table with lost_patients table by date column and procdate column
Then continue to use your formula
Result:
Best Regards,
Lin
DATEADD is a bit sneaky ....."The result table includes only dates that exist in the dates column."
I think you have to build a date with your own formula OR build a date table with a wider range
Thanks the info. I changed the dax by replacing Dateadd() with Date ()
hi, @ruban
Use Date () Function needs to consider the leap year condition, that may be a bit complex.
You could try this simple way:
use CALENDAR() to create a wider range date table
for example:
Date = CALENDAR(MIN(Table1[procdate])-549,MAX(Table1[procdate])+549)
Then create the relationship between date table with lost_patients table by date column and procdate column
Then continue to use your formula
Result:
Best Regards,
Lin
thanks Lin
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 |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |