Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

% change

hi,

I have a small requirement, I need to show count of products that falls in a a certain bucket % change (>.5% and <-.5%) for given a dimension 1, but the challenge is show calculate the % at one level below dimension 1.

consider the example as shown below

     

CategoryProductyesterday's priceToday's price% change
Cat1prod11001022.00%
Cat1prod21061070.94%
Cat1prod3110108-1.82%
Cat1prod4123122-0.81%
Cat2prod59391-2.15%
Cat2prod61011020.99%
Cat2prod72728.55.56%

as you can see there are two categories cat1 and cat2 having multiple products within same category prod 1 to prod7, i need to calcuate % change at prod level but o/p table should only how count of products that falls in a a certain bucket % change (>.5% and <-.5%)

   

Categoryprod count > .5%prod count < .5%
Cat1                            2                                 2
cat2                               2                                 1

please let me know how to achive this.

thanks,

2 Replies
marcus_sommer

I think this is helpful: Buckets

- Marcus

maxgro
MVP
MVP

sum(if(aggr(sum([% change]), Product)<0.5,1))

sum(if(aggr(sum([% change]), Product)>0.5,1))