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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
PBandI
Frequent Visitor

Calculated Column not returning all correct values

Hi,

 

I created a calculated column that is taking the data from the "Wholesale Ship Date" column and adding 5 days to it: 

 

_Due Date = DATEADD('Wholesale | Retail'[Wholesale Ship Date], 5, DAY)
 
As you can see in the screenshot below, it is correctly working for some dates but not all. If I change the number of intervals to 7 or 21 for example, the amount of values in the _Due Date column change as well. Eventually this number of intervals will be driven by another measure, so I would appreciate any advice on how to fix this, thanks!
PBandI_0-1717110351108.png

 

 

1 ACCEPTED SOLUTION
PBandI
Frequent Visitor

I figured out the solution. The value that the measure returns using the DATEADD function must exist in the same column (in this case Wholesale Ship Date) which isn't always true. I just added +5 to my Wholesale ship date column and it solved my issue. 

View solution in original post

3 REPLIES 3
PBandI
Frequent Visitor

I figured out the solution. The value that the measure returns using the DATEADD function must exist in the same column (in this case Wholesale Ship Date) which isn't always true. I just added +5 to my Wholesale ship date column and it solved my issue. 

vicky_
Super User
Super User

Hmm i would check if your 'Wholesale | Retail' table actually has a value that is 5 days before. I.e is there actually a 5/26/2022 in the dataset? how about 6/25/22? If not, then that would be why your formula is returning blanks - it can't create a date that doesn't exist in the dataset. 
To fix it, you can create a date table (which contains every single date) and use that in your calculations instead.

PBandI
Frequent Visitor

The column should be adding 5 days to the "Wholesale Ship Date" column so why would it need to look and see if there is a value 5 days before? If I'm understanding correctly I just thought there would need to be a date in that column and then the measure would compute 5 days after that date and put that value in the new calculated column. I also currently have a date table that is connected to my "Wholesale | Retail" table but when I create the measure in the date table I still recieve blanks. Here is a new sample using the same measure but created within the date table:

PBandI_0-1717176413552.png

 

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.