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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
MFoster
Frequent Visitor

Dateadd and Lookupvalue With Blank Values at Random

Hi,

 

I have a table with a few calculated columns that seemed to be working correctly but now there are several values being returned as blank. I have tried changing some of the negative values to positive and it will return a result for some dates but not others. Could this be an issue with memory? I’m running the X86 version of desktop due to some limitations of a OBDC connection.

 

Thanks for the Help!

 

MFoster_0-1673301338891.png

 

 

MFoster_1-1673301338906.png

 

 

BOM [Lot]

MFoster_2-1673301338908.png

 

 

MFoster_3-1673301338923.png

 

 

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @MFoster ,

 

Here are some limitations of DATEADD function that may influence the result:

  • The result table includes only dates that exist in the dates column.

  • If the dates in the current context do not form a contiguous interval, the function returns an error.

Please try:

Week Of = [Date]-[Day of Week]

Week Of Production Report = 
var _a = IF([Day of Week]=0,-6,[Day of Week]-1)
return [Date]+_a

Output:

vjianbolimsft_0-1673331810285.png

Your LOOKUPVALUE function seems to involve more than one table?

What do each of these tables look like and how do they relate to each other?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @MFoster ,

 

Here are some limitations of DATEADD function that may influence the result:

  • The result table includes only dates that exist in the dates column.

  • If the dates in the current context do not form a contiguous interval, the function returns an error.

Please try:

Week Of = [Date]-[Day of Week]

Week Of Production Report = 
var _a = IF([Day of Week]=0,-6,[Day of Week]-1)
return [Date]+_a

Output:

vjianbolimsft_0-1673331810285.png

Your LOOKUPVALUE function seems to involve more than one table?

What do each of these tables look like and how do they relate to each other?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

 

I was able to use power query to add the “Lot” column and eliminate the LOOKUPVALUE function.

 

Using the variable instead of the dateadd worked and everything is populating as expected.

 

Thanks for the help!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.