Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
MrJanjua
Contributor II
Contributor II

Need Code for Two column

Hi, I have two columns with Items and Category

 

Items       Category

Milk             Bakery

Bread       Bakery

Water       Shop

Biscuets   Shop

Nugets      Bakery

 

 

I wants to show two pia-cart with Bakery Items separate and Shop Items separate. i need a expression for this

 

Labels (1)
4 Replies
Dalton_Ruer
Support
Support

Here you go. the expression I used is in the label for the pie charts 

Categories.png

 

I used this sample code:

Load * Inline [
Items , Category, Value
Milk, Bakery, 40
Bread, Bakery, 30
Water, Shop, 45
Biscuets, Shop, 55
Nugets, Bakery, 20
];

And I created a Master Dimension for the Category and defined the colors then set the pie charts to color by the Category dimension

CategoryColors.png

 

 

MayilVahanan

Hi 

Try with set analysis

Exp1: Count({<Category = {'Bakery'}>} Distinct Items)

Exp2: Count({<Category = {'Shop'}>} Distinct Items)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
MrJanjua
Contributor II
Contributor II
Author

Dear!

I need this in Demission (Expression) not in Measure. 

MrJanjua
Contributor II
Contributor II
Author

I have a lot of items and have 4 categories. So wants to make 4 Charts separately, One thing more items adds frequently they are not fixed