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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trellis pie chart with relative percentages for each box

Trying to create a trellis pie chart for dimensions Year and Expense Class...year being first so that I get a single pie chart for each year. I've set the expression to "relative" so I can see the percentages for each slice of the pie; however, the percentages are currently calculated based on everything and I need to reset the percentages by year. In other words, I want each year to represent 100% not its percentage of the total for all years. Thoughts?

8 Replies
pover
Partner - Master
Partner - Master

Remove the Relative option in the pie chart and use a function similar to the one below:

sum(Sales)/sum(Total <Year> Sales)

Regards.

Not applicable
Author

That did it. Thanks Karl!

Not applicable
Author

I have a similar scenario with 3 dimensions (Period, Season, Rating) and I need the relative percentage in each chart for a count of "ids"... Can that be done with a similar formula as the one mentioned? Can you give an example?

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, exactly the same formula, and the same example - just replace Year with your field(s) - separated by a comma, if you have more than 1...

Ask me about Qlik Sense Expert Class!
Not applicable
Author

I tried that and it worked... But when I did it all my pie charts started varying in their actual size... It looks like all the charts where the percentage is 100% are one size and the charts with multiple percentages are another... Is there something that controls this?

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you post a screenshot? I'm not sure how a pie chart with 3 dimensions should be presented...

Ask me about Qlik Sense Expert Class!
Not applicable
Author

here is a screen shot...

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Very strange... It looks like you are using Trellis chart on the Primary and Secondary dimensions. The size of the pie might represent the relative "weight" of the secondary dimension values within the Primary Dimension "group"...

Ask me about Qlik Sense Expert Class!