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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Get last non-empty value between 2 tables

Hi,

 

I have two tables like the ones I show in the image related to ID_DAY.

Rasomon_0-1672331937289.png

 

When I display them in a table, the DAY and IMPORTE fields look something like this:

Rasomon_1-1672332033977.png

 

What I want is that when a day has no value, in this case 04/01/2022, it takes the value of the last previous date that has an amount. In this case it should be:

 

Rasomon_2-1672332115876.png

 

I have tried different ways and with different formulas but none have worked for me.

Somebody could help me?

 

Thx

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Simple enough

CNENFRNL_0-1672390319815.png

 

For fun only, a showcase of powerful Excel worksheet formulas,

CNENFRNL_1-1672390736297.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Simple enough

CNENFRNL_0-1672390319815.png

 

For fun only, a showcase of powerful Excel worksheet formulas,

CNENFRNL_1-1672390736297.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

tamerj1
Super User
Super User

Hi @Anonymous 

If only one blank cell at a time, then you can use the new OFFSET function. If in sny case there are multiple consequent blank cells then little more complex dax will be required. Please advise 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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