Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sales ratio of product groups for each store

Hello everyone,

I want to show sales ratio of the selected product group for each store in order to compare them.

Sales ratio=  sales of product group in the store/total sales of the store


There are a lot of types of product groups. Product groups: a,b,c,d,e,f,g,....

When i clik the one of the product groups, I want to see the sales ratio of that group of products in each store.

I couldn't fix total store sales while selecting product group.

store
  names
Total salesGroup a salesRatio
EZM1.885.515 TL379.745 TL20,14%
KCY1.878.787 TL370.048 TL19,70%
KTA1.860.449 TL243.906 TL13,11%
UMR1.622.075 TL213.078 TL13,14%
SRD1.538.014 TL212.894 TL13,84%
BBR1.519.321 TL168.514 TL11,09%
MSK1.484.457 TL165.852 TL11,17%
ERR1.300.119 TL162.371 TL12,49%
FTA1.219.798 TL139.924 TL11,47%
KSA1.195.546 TL111.287 TL9,31%
TCR1.148.581 TL110.808 TL9,65%

I tried (Price)/sum(TOTAL<Group> Price)  expression but it doesn't work. It shows sales ratio of each stores.

Could you help me?

2 Replies
Not applicable
Author

Hi,

look on example.

You may use expression like:

sum(val)/sum({<group=>}val)

regards

Darek

Not applicable
Author

Thanks Dariusz.

Can I use  this expression "sum({<group=>}val)" for more than one dimension?

For example, we have parent groups and child groups. How can I calculate total sales for child group and parent group? I want that total sales for stores dont change even if i select one of the parent groups or child groups.