Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
riceball
Contributor
Contributor

Aggr(NODISTINCT) Function Help

Hi,

I've encountered one problem when trying to use aggr() function. As shown in the attached, my expression for current product name doesn't seems to work.

Only (IF(Date(aggr(NODISTINCT MAX(Date),Channel,Country))=Date(Date),Name))

Instead of having "-", i would like my result to look like this (please see highlighted cells).This column will reflect my latest product name based on the latest date, group by channel (A/B):

Sample.png

Please advise. Appreciate your help on this

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can use these expressions:

date(max(total <Channel,Country> Date),'DD/MM/YYYY')

FirstSortedValue(total <Country,Channel> Name, -Date)

See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

You can use these expressions:

date(max(total <Channel,Country> Date),'DD/MM/YYYY')

FirstSortedValue(total <Country,Channel> Name, -Date)

See attached qvw


talk is cheap, supply exceeds demand
riceball
Contributor
Contributor
Author

It works! Thank you so much for your help!!!!