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, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
owais
Regular Visitor

Unexpected result of 'lastnonblank' formula

Hi

 

I am getting an strange or unexpected result in calculated column in 'lastnonblank' formula. Bilow is the picture describing the problem.project table.png

 

'Last update date' column is also a calculated column using last date formula but same formula is resulting wrong value in next column. How I can fix this error?

 

n.b. Relation between both table is 1 to many.

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @owais,

 

Please create a calculated column use LOOKUPVALUE( ):

 

current status = LOOKUPVALUE('updates'[Update Status],'updates'[Project Name],'Table1'[Project Name],'updates'[Update Date],'Table1'[last update date])

 

q1.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @owais,

 

Please create a calculated column use LOOKUPVALUE( ):

 

current status = LOOKUPVALUE('updates'[Update Status],'updates'[Project Name],'Table1'[Project Name],'updates'[Update Date],'Table1'[last update date])

 

q1.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-qiuyu-msft

 

Thanks for perfect reply. Its working with lookup. But could you explain what was wrong in my formula? and another thing, if there are 2 or more entries in same date for same project, which wone it will take?

 

Thanks

Hi @owais,

 

The LASTNONBLANK() function is used for returning the last value in the column, column, filtered by the current context, where the expression is not blank.

 

Regarding the calculated column:

 

Column = LASTNONBLANK('updates'[Update Status],LASTDATE('updates'[Update Date]))

 

As 'updates'[Update Status] is TEXT, it will sort 'updates'[Update Status] values based on the first character within each project. So that's the issue why you didn't get desired results.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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