cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

DAX equivalent of XLOOKUP function in Excel

Capture.PNGIs there a way to duplicate the XLOOKUP function in DAX? In my excel file, if the number of photos=0, then I need to look for the next date where the number of photos is greater than 0, and assign the Tier Lookup to the dates prior. The desired result is shown in column I.

 

Thank you!

 
 
5 REPLIES 5
Highlighted
Super User IV
Super User IV

Re: DAX equivalent of XLOOKUP function in Excel

I believe you want LOOKUPVALUE

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Frequent Visitor

Re: DAX equivalent of XLOOKUP function in Excel

Thanks Greg, I'll see if I can make that work.

Best,

Jennifer

Highlighted
Advocate II
Advocate II

Re: DAX equivalent of XLOOKUP function in Excel

Good afternoon jwarner,

 

Consider using Power Query to solve this instead of DAX. Power Query offers better tracability of this kind of transformation.

I reserve DAX in order to create measures that I will use in my visual and not to transform data.

Regarding your question:

   - sort your data set by date ascending

   - assuming the column "project tier" is filled for the day with a number of pictures and NULL for the day with number of pictures is 0, then you could use the out fo the box function "Fill up" to fulfill your requirements.

 

Did it answer your question? Mark it as a solution to your post

If you like my solution, please add a kudo 

Good luck.

 

Kind regards,

Lohic Beneyzet

 

 

Highlighted
Frequent Visitor

Re: DAX equivalent of XLOOKUP function in Excel

Thanks! I'll give that a try.

Best,

Jennifer

Highlighted
Anonymous
Not applicable

Re: DAX equivalent of XLOOKUP function in Excel

This is certainly a job for PowerQuery, not DAX, if you want to transform data in a model table.

Best
D

Helpful resources

Announcements
Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors