Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pie Charts: One dimension and multiple expressions

Hello,

I am looking for some help in building the pie chart. I have  a scenario where I need to build  a pie chart  to show the analysis of sales , for example I have 3 locations lets say loaction1,location2,location3 ,I need to show the sales in each location as per the year for last 3 years, like location1 sales for year 2015,2014,2013 and similarly for other locations.Can I achieve this using Pie chart. On the whole I need to have one dimension which would be location and sum(sales per year) for past 3 years as expressions.

Any help is highly appreciated.

Thanks

heera

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

HI,

You need to use 2 Dimensions Location and Year, and the expression should be

=Sum({<Year={'$(>=Max(Year)-2)'}>}Sales)

I think the best method to display this in Trellis, where there is a separate Pie chart for each Location with years with the same dimensions and expression.

You can create Trellis by using

Chart Properties -> Dimensions -> Trellis -> Enable Trellis Chart

or use bar chart with above dimensions and expression and use Stacked option in Styles tab.

Hope this helps you.

Regards,

Jagan.

View solution in original post

7 Replies
swuehl
MVP
MVP

How should the pie chart look like with these requirements?

You can use two dimensions, location and year, and your  aggregated sales and check if this fullfills your requirements.

MarcoWedel

restrict the years using a set expression.

Anonymous
Not applicable
Author

Pie chart is good mostly for presentations, seldom for real analysis.  You have not one but two dimensions - location and year.  I recommend to use bar chart, stacked or grouped.

jagan
Luminary Alumni
Luminary Alumni

HI,

You need to use 2 Dimensions Location and Year, and the expression should be

=Sum({<Year={'$(>=Max(Year)-2)'}>}Sales)

I think the best method to display this in Trellis, where there is a separate Pie chart for each Location with years with the same dimensions and expression.

You can create Trellis by using

Chart Properties -> Dimensions -> Trellis -> Enable Trellis Chart

or use bar chart with above dimensions and expression and use Stacked option in Styles tab.

Hope this helps you.

Regards,

Jagan.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You could make a single calculated dimension of

=location & '-' & year

That would give you one slice for each location & year combination,

-Rob

http://masterssummit.com

http://robwunderlich.com

hariprasadqv
Creator III
Creator III

Calculated Dimensions May help you!! Or you can try valuelist()

Anonymous
Not applicable
Author

Thank you all. I tried Trellis and it worked. Thank you again for the response.