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
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

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
Employee
Employee

Sounds like a job for the first sorted value function.

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

 

Community Manager
Community Manager

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

Sue Macaluso
Partner
Partner

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

Partner
Partner

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

thanks again !