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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.