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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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

Best
D
lbeneyze
Advocate II
Advocate II

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

 

 

Anonymous
Not applicable

Thanks! I'll give that a try.

Best,

Jennifer

Greg_Deckler
Super User
Super User

I believe you want LOOKUPVALUE


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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

Best,

Jennifer

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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