Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get Latest Year for Sales

Hi everyone,

I have a date dimension which has years 2000 up to 2025.

I need to get the latest year that has sales (in this case 2013), and need to display this value in a simple text object.

Can anybody provide some pointers to write this expression?

Thanks,

J

Labels (1)
1 Solution

Accepted Solutions
sivarajs
Specialist II
Specialist II

max(if(not IsNull(Sales),Year))

or

max({<Sales={'*'}>}Year)

View solution in original post

2 Replies
sivarajs
Specialist II
Specialist II

max(if(not IsNull(Sales),Year))

or

max({<Sales={'*'}>}Year)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Something like this should do it: max({<SalesValue={'*'}>} Year). Replace SalesVales and Year with the names of your dimensions.


talk is cheap, supply exceeds demand