Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
has35526
Contributor III
Contributor III

Show the latest Record in Filter Pane

Hi Everyone,

I need to show the latest record in the filter pane. The firstsortedvalue is working as expected but only when I created a measure. Is there a way to show the latest record only in the filter pane.

For example: I only want to show NLS-FSMFTB in the filter pane. 

NLS
NLS- FMFTB
Labels (3)
13 Replies
Anil_Babu_Samineni

How the values decided when they created/inserted? 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
has35526
Contributor III
Contributor III
Author

Is based on the date I believe 

Anil_Babu_Samineni

If date is primary for your model, try this

If(date(date)=date(Max(Total date)), <Your expected FieldName>)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
has35526
Contributor III
Contributor III
Author

@Anil_Babu_Samineni Thanks for your reply. this formula is reducing the search result If(date(date)=date(Max(Total date)), <Your expected FieldName>) meaning without this expression we have 30 records and when I add this expression I only get 15 records. 

Anil_Babu_Samineni

Can you please share the sample data set and expected result?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
has35526
Contributor III
Contributor III
Author

@Anil_Babu_Samineni Here is test data. The expected result is that I only want to show the latest company name which is NLS- FMFTB. I can't use the if statement to rename the company name as there could be multiple company name where the name has been changed in the database. 

Anil_Babu_Samineni

Why can't you use like this as expression in filter pane?

=If(date(processing_date, 'yyyy-mm-dd')=date(Max(Total processing_date), 'yyyy-mm-dd'), company_name)

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
BrunPierre
Partner - Master
Partner - Master

@has35526  Try like this.

=Aggr(If(processing_date=Max(TOTAL processing_date), company_name), record_id)

has35526
Contributor III
Contributor III
Author

Sorry Anil I couldn't reply earlier. The reason why this expression is not working because it is limiting the company name. Only displaying max total processing date company names.