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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Jebilaya
Helper III
Helper III

lookupvalue with date variable

I am trying a (what I thought would be simple) lookupvalue Dax which is to take use the period start date from the table below minus 7 days and look it up in my date table


Unfortunately it returns a blank value.  If I use the period start date the lookupvalue formula works fine so it's something to do with the -7 days.  It's definitely returning the -7 days as a date / time format.

Any ideas?

 

Jebilaya_0-1671711643486.png

 

1 ACCEPTED SOLUTION
TomasAndersson
Solution Sage
Solution Sage

Weird, I can't replicate your issue. Works when I just set up a date table and a "fact table" with an opening date.

TomasAndersson_0-1671714461897.png

Do you have a relationship between your opening date column and master date table? Does the master date table have a large enough date range to give a result for all lastweekdates? 

Maybe if you can share more data or a sample file it can be easier to see what happens.

 

View solution in original post

2 REPLIES 2
TomasAndersson
Solution Sage
Solution Sage

Weird, I can't replicate your issue. Works when I just set up a date table and a "fact table" with an opening date.

TomasAndersson_0-1671714461897.png

Do you have a relationship between your opening date column and master date table? Does the master date table have a large enough date range to give a result for all lastweekdates? 

Maybe if you can share more data or a sample file it can be easier to see what happens.

 

It was the relationship piece @TomasAndersson 

 

Thanks

Helpful resources

Announcements
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.