Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
TarekHajji
Contributor II
Contributor II

pie chart with calculation dimension

Hello , I have a table with two columns IdProduct and price

How can i show a pie chart that count the percentage of the product with price < 30, 

the percentage of the product with price >30 and < 100,

the percentage of the product with price > 100

 

Thank you for your helps

 

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

Create pie chart with

 

Dimension : Valuelist('Price<30','Price>30<100','Price>100')

Expression:

Pick(match(Valuelist('Price<30','Price>30<100','Price>100'),'Price<30','Price>30<100','Price>100'),

Count({<Product ={"=Sum(Price)/Sum(Total Price)<0.3"}>}distinct Product),

Count({<Product ={"=Sum(Price)/Sum(Total Price)>0.3 and Sum(Price)/Sum(Total Price)<1"}>}distinct Product),

Count({<Product ={"=Sum(Price)/Sum(Total Price)>1"}>}distinct Product))

 

View solution in original post

1 Reply
Kushal_Chawda
MVP
MVP

Create pie chart with

 

Dimension : Valuelist('Price<30','Price>30<100','Price>100')

Expression:

Pick(match(Valuelist('Price<30','Price>30<100','Price>100'),'Price<30','Price>30<100','Price>100'),

Count({<Product ={"=Sum(Price)/Sum(Total Price)<0.3"}>}distinct Product),

Count({<Product ={"=Sum(Price)/Sum(Total Price)>0.3 and Sum(Price)/Sum(Total Price)<1"}>}distinct Product),

Count({<Product ={"=Sum(Price)/Sum(Total Price)>1"}>}distinct Product))