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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Top Solution Authors