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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
ruban
Frequent Visitor

DAX not applying for all cells in the calculated column

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

 data missing.JPG

Ruban

1 ACCEPTED 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

 

6.JPG

 

Then continue to use your formula

Result:

7.JPG

 

Best Regards,

Lin

 

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

View solution in original post

4 REPLIES 4
HotChilli
Super User
Super User

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

 

6.JPG

 

Then continue to use your formula

Result:

7.JPG

 

Best Regards,

Lin

 

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

thanks Lin

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors