cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vinagre01
New Member

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 REPLY 1
maxigtsh
Helper I
Helper I

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.