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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.