Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
thierrytt1102
Partner - Creator II
Partner - Creator II

Set analysis, article most sold over the past year

Hi guys, 

I'd like to have a table that contains by CLIENT the ARTICLE the most sold over the past year. 

meaning something like


only({<
[Article]={"=max(aggr(count({< [Date]={">=$(=addyears([Year-Month],-1))<=$(=(monthend(addyears([Year-Month],0)))))"} [Article"}

>} [Article])

 

but I don't find.

Could you help me? 

Thx!

Labels (1)
4 Replies
Lisa_P
Employee
Employee

Sounds like a job for the first sorted value function.

FirstSortedValue(Article, -Aggr(Count(
{<Date={"<$(=addyears(today(), -1))"}>}
Article), Client))

 

Sue_Macaluso
Community Manager
Community Manager

@thierrytt1102  Are you using QlikView or Qlik Sense, I would like to move this into the correct product forum

Sue Macaluso
thierrytt1102
Partner - Creator II
Partner - Creator II
Author

hi, actually, both.. but we'll fully switch to QS in a few months

thierrytt1102
Partner - Creator II
Partner - Creator II
Author

ok thank you. and what if I'd like to have clients that were only created in March 2019 for example? 

thanks again !