Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
griffin2571
Contributor
Contributor

Show Max Date On Dimension Field

I have two records with the same Vin number but only want to show the most recent date. It's my understanding that you can't use set analysis  like it's a measure. I used this expression but all it has done is change the other record to 9-30-22. How do i create an expression show the table will only show the most recent date.

=Date(Aggr(Max(TOTAL [Drop Off Date]),[Drop Off Date]),'YYYY-MM-DD')

 

Status Car Vin Job Description Comments Drop Off Date Type of Repair Repair Status 
In Shop  82000917 Oil Change   2022-09-30 Drop off NO DELAYS
In Shop  82000917 Oil Change   2022-06-01 Drop off NO DELAYS

 

It should only show this record

Status Car Vin Job Description Comments Drop Off Date Type of Repair Repair Status 
In Shop  82000917 Oil Change   2022-09-30 Drop off NO DELAYS
1 Solution

Accepted Solutions
Rockstar7
Partner - Creator
Partner - Creator

tested the same in my environment it is working fine and giving only one record which contains 30-09-2022. Please verify again

Rockstar7_1-1670945600807.png

View solution in original post

3 Replies
Rockstar7
Partner - Creator
Partner - Creator

While doing aggr you need to add Carvin as well in the expression like this

Date(Aggr(Max(TOTAL [Drop Off Date]),[Car Vin],[Drop Off Date]),'YYYY-MM-DD')

or you can use a simpler one like below

Aggr(max([Drop Off Date]),[Car Vin])
griffin2571
Contributor
Contributor
Author

I tried both your formula but it only changed the second record to 9-30-22. How do i get the dimension to only show that one record with 9-30-22.

Status Car Vin Job Description Comments Drop Off Date Type of Repair
In Shop  82000917 Oil Change   2022-09-30 Drop off
In Shop  82000917 Oil Change   2022-09-30 Drop off
Rockstar7
Partner - Creator
Partner - Creator

tested the same in my environment it is working fine and giving only one record which contains 30-09-2022. Please verify again

Rockstar7_1-1670945600807.png