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

distribution over possible values

dear all,

writing you about an issue i don't know how to solve.

I'm trying to display a line chart where i want to show the distribution of shops over all possible values.

I loaded all possible values as dimension AXE (basically it's the range 0->1, with step 0.01).

For each shop, i want to calculate the percentage of sales on the total.

Example:

shop 1 , sales=2 -> %sales=10%

shop 2, sales=5 -> %sales=25%

shop 3, sales=8 -> %sales=40%

shop 4, sales=5 ->%sales=25%

My expected output would be a line chart where axe X are all values from 0 till 100%, and for X=10% i get 1, for X=25% i get 2 and for X=40% i get 1.

 

Any idea how to solve this? thanks

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi @marikabi, you can set as calculated dimension: =Aggr(Num(Round(Sum(Sales)/Sum(TOTAL Sales),0.01), '0%'), Shop)

Expression: Count(Shop)

This will show an axis with only 10%, 25% and 40%, if you want x axis from 0 to 100% you can set this in Axis tab, set 'Continuous' for axis dimension and the range from 0 to 1 in 0.01 steps, optionally you set vertical labels to show more axis values.

rubenmarin_0-1604741161637.png

 

In Numbers tab there is an option to show axis values as percentage

rubenmarin_1-1604741179467.png

 

View solution in original post

2 Replies
rubenmarin

Hi @marikabi, you can set as calculated dimension: =Aggr(Num(Round(Sum(Sales)/Sum(TOTAL Sales),0.01), '0%'), Shop)

Expression: Count(Shop)

This will show an axis with only 10%, 25% and 40%, if you want x axis from 0 to 100% you can set this in Axis tab, set 'Continuous' for axis dimension and the range from 0 to 1 in 0.01 steps, optionally you set vertical labels to show more axis values.

rubenmarin_0-1604741161637.png

 

In Numbers tab there is an option to show axis values as percentage

rubenmarin_1-1604741179467.png

 

marikabi
Creator
Creator
Author

amazing! This works perfectly 🙂

 

thank you