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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Vinagre01
Frequent Visitor

Get the last non blank value based on two columns

Hello!

 

I have the following table (It's just one table. I screenshoted in different places) that I want to summarize based on the last value of two columns (Real and Target), producing other two columns in the new table with these new values.

 

Sans titre.png

Sans titre.png

Sans titre.png

Until now, I was only able to get the last value from the real column. 

 

SUMMARY = 
SUMMARIZE(Append1, Append1[NAME], "Real", LASTNONBLANKVALUE(Append1[Week], SUM(Append1[Real])))

 

 

Sans titre.png

However, I also need to get the last value from the "Target" column, also based on the last value of the "Real" column.

 

So we would get something like this

 

NAMERealTarget
FER510945
MON689530
Transferência de Peças400715

 

As you see above, the last update was made in W34 for "FER" and "MON" and in W36 for "Transferência de Peças".

 

Any idea on how to get the result above?

 

Thank you in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello,

 

this did the trick:

 

Real_ = LASTNONBLANKVALUE('Sample'[Week], SUM('Sample'[Real]))
Target_ = LASTNONBLANKVALUE('Sample'[Real], SUM('Sample'[Target]))
 
check.PNG
 
If this helped, please mark it as the solution, thanks 🙂

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hello,

 

this did the trick:

 

Real_ = LASTNONBLANKVALUE('Sample'[Week], SUM('Sample'[Real]))
Target_ = LASTNONBLANKVALUE('Sample'[Real], SUM('Sample'[Target]))
 
check.PNG
 
If this helped, please mark it as the solution, thanks 🙂

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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