Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
george54
Creator III
Creator III

Set Analysis Max Date Record

Hi all,

Need the max record, depending on the max date. See below.

Can not use something like that, because there is nothing to aggregate (for instance in Column "Sync_Key"):

Sum({$<%Date = {"$(=Max(%Date))"}>} Sync_Key)

Thanks.

 

%DateUserSync_Key
01.01.2020AlbertAlbert | 01.01.2020
02.01.2020AlbertAlbert | 02.01.2020
03.01.2020AlbertAlbert | 03.01.2020
01.01.2020StefanStefan | 01.01.2020
02.01.2020StefanStefan | 02.01.2020
   
Result:  
%DateUserSync_Key
03.01.2020AlbertAlbert | 03.01.2020
02.01.2020StefanStefan | 02.01.2020
Labels (1)
5 Replies
sunny_talwar

@george54 May be this

 

Dimension
User

Expression
FirstSortedValue(Sync_Key, -%Date)
Date(Max(%Date))

 

george54
Creator III
Creator III
Author

Don't understand. These are to functions; where to put it? If I put only FirstSortedValue(Sync_Key, -%Date) in a separate Dimension, does not work

sunny_talwar

@george54 You need it as a dimension? Try this

 

User
Aggr(FirstSortedValue(Sync_Key, -%Date), User)
Aggr(Max(%Date), User)

 

Chanty4u
Champion III
Champion III

can you try this?

=sum({<%Date={"$(=Date(Max(%Date),'DD.MM.YYYY'))"}>}  sync_key)

 

Best

Chanty 

george54
Creator III
Creator III
Author

Hi and thanks all of you, but none of these formula worked:

User Aggr(FirstSortedValue(Sync_Key, -%Date), User) Aggr(Max(%Date), User) // Error: not valid Dimension

Sum({<%Date={"$(=Date(Max(%Date),'DD.MM.YYYY'))"}>} Sync_Key)                     // Error: not valid Dimension

User Aggr(FirstSortedValue(Sync_Key, -%Date), User) Aggr(Max(%Date), User) // Syntax Error

FirstSortedValue(Sync_Key, -%Date) Date(Max(%Date))                                                // Syntax Error

 

Have only these 4 Dimensions in the Outputtable, no measures:

george54_0-1602488734824.png