Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Hi, Dhruv. Try this
=Sum({<[Distribution R12W]={9,10,11,12},Flag1={'Distribution'}, [All Targeted SKU Flag]={1}>} if(aggr(max({<[Distribution R12W]={9,10,11,12}, TOTAL<Customer> [All Targeted SKU Flag]={1}>}[Served SKU Flag])=0, Customer), 1))
Thanks Andrey for your quick reply.
But when i am using your suggested expression is not working becuase of that Total <Customer>. can you please recheck and help it.
=Sum({<[Distribution R12W]={9,10,11,12},Flag1={'Distribution'}, [All Targeted SKU Flag]={1}>} if(aggr(max({<[Distribution R12W]={9,10,11,12}, TOTAL<Customer> [All Targeted SKU Flag]={1}>}[Served SKU Flag])=0, Customer), 1))
Thanks,
Dhruv
I think this will suffice
Count(aggr(if(max({<[Distribution R12W]={9,10,11,12},[All Targeted SKU Flag]={1}>}[Served SKU Flag])=0, Customer),Customer))
Thanks Anil,
While applying your given expression , it's only giving me 1 Product code and doesn't shows other code .
can you please check it because the logic wise my expression is correct but not working properly.
Thanks.
Can you attach sample
Do you want image or Design part?
if the design part, then it is too heavy so not possible to attach. i
May be this expression:
=if(max({<[Distribution R12W]={9,10,11,12},[All Targeted SKU Flag]={1}>}[Served SKU Flag])=0,
Aggr(
count({<[Distribution R12W]={9,10,11,12},Flag1={'Distribution'}, [All Targeted SKU Flag]={1}>}Customer),
Customer)
)
May be try this:
=Count(if(max({<[Distribution R12W]={9,10,11,12},[All Targeted SKU Flag]={1}>}[Served SKU Flag])=0,
Aggr(
count({<[Distribution R12W]={9,10,11,12},Flag1={'Distribution'}, [All Targeted SKU Flag]={1}>}Customer),
Customer)
))
What exactly is your dimension in the chart above? Is it Customer of something else?