Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
dhruvkumar_josh
Contributor
Contributor

While Applying Aggregation Expression level in chart its changing the output Result

Hi All Qlik Experts,

I am facing one issue in Aggr function.

Scenario:

I need the count of customer who has been missed to be server particular product Rolling 4 Weeks.

so i applied aggr functiion, at summary level the count of customer is not coming proper but if i select any one product its coming proper.

Expression is :

=count({<[Distribution R12W]={9,10,11,12},Flag1={'Distribution'}, [All Targeted SKU Flag]={1}>} aggr(if(max({<[Distribution R12W]={9,10,11,12},[All Targeted SKU Flag]={1}>}[Served SKU Flag])=0, Customer),Customer))

For more info please refer the attached screenshot.

Thanks,

Dhruv.

Count issue.jpg

16 Replies
andrey_krylov
Specialist
Specialist

Sorry Dhruv. I see my error and now it should work

=Sum({< [Distribution R12W] = {9,10,11,12}, Flag1 = {'Distribution'}, [All Targeted SKU Flag] = {1} >}

     aggr(

          if(

               max({< [Distribution R12W] = {9,10,11,12}, [All Targeted SKU Flag] = {1}>} TOTAL<Customer> [Served SKU Flag]) = 0

           , 1)

     , Customer)

)

dhruvkumar_josh
Contributor
Contributor
Author

Hi Sunny,

The Dimension which i used in chart is Product but i want product wise Customer count.

Thanks,
Dhruv

dhruvkumar_josh
Contributor
Contributor
Author

Thanks Andrew,

I used given expression, it's also changing the values . i tried all the scenario here. does not working

sunny_talwar

So, may be you need this

=Count({<[Distribution R12W] = {9,10,11,12}, Flag1 = {'Distribution'}, [All Targeted SKU Flag] = {1}>} Aggr(If(Max({<[Distribution R12W] = {9,10,11,12}, [All Targeted SKU Flag] = {1}>} [Served SKU Flag]) = 0, Customer), Customer, Product))

dhruvkumar_josh
Contributor
Contributor
Author

Thanks Sunny,

I will try to use this function and will update.

dhruvkumar_josh
Contributor
Contributor
Author

Dear Sunny,

I applied your Expression , while i select the product its working fine but when i deselect the product my chart showing Error or sometimes its stuck and need to forcefully close the design application.

sunny_talwar

It is difficult to say, would you be able to share a sample?

Preparing examples for Upload - Reduction and Data Scrambling