Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dimensions and Pie Chart

Hi everyone!

I am very new to qlik. Problem description:

So i have a data set with fields: shop names and sales from those shops and sales per category of a product in every shop. I want to create a pie chart with only two sections: Product Category A and Product Category B, which would sum the sales for each of these categories from all the selected shops in the filter. So no matter how many shops i select the pie chart is always divided only in two sections.

Edil

8 Replies
MK_QSL
MVP
MVP

But what is your question? What output you want?

Use Shop as Dimension

and below expression

SUM({<Category = {'A','B'}>}Sales)

Change field names accordingly

Anonymous
Not applicable
Author

When i use shop as a dimension, the pie chart is divided into as many sections as the number of shops i have. Instead I need the pie chart to be divided into two sections only. one section should show the sum of all the sales in all shops for Category A, the other section should show the sum of sales in all shops for Category B.

The question is, i guess, how do i create a dimension that contains the two categories, and a measurement for those categories?

Thanks

MK_QSL
MVP
MVP

Use Category as dimension

SUM({<Category = {'A','B'}>}Sales) as expression

Anonymous
Not applicable
Author

but i do not have a field that contains the categories. So i have Table 1, with sales on fruits for example, where i have apples, oranges etc. Then i have table 2 with sales on vegetables: carrots, tomatoes etc.

Now category A - apples

category B - carrots.

now i need a pie chart, to see what amount of income is delivered from carrots and how much i got from apples.

MK_QSL
MVP
MVP

Dimension

Fruit

Expression

SUM({<Fruit = {'apples','carrots'}>}Sales)

Make sure that apples <> Apples and Carrots <> carrots....

Sales <> sales.. and Fruit <> fruit..

In short it is case sensitive..

Not applicable
Author

see the attach,if that is what you want.

Anonymous
Not applicable
Author

okay, I think we are going somewhere.

the question that rises from here is:

How do i create a new dimension called "Fruit"? because in my table 1 it looks like:

Shop Name     Total Sales     Apple Sales     Orange Sales

Shop 1            100               60                    40

Shop 2             500               300                  200

And my table 2 looks something similar but for vegetables. So i do not have a field "Category" that would list the categories that i have which i could include.

MK_QSL
MVP
MVP

I think better you provide sample data. Otherwise this is never ending discussion and wasting both of our time.