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: 
jasonwills
Contributor II
Contributor II

Pop up Value and percentage on pie chart

Hi All,

i am having a slight issue with my pie chart, and cannot figure it out.

i have various revenue amounts for different products throughout the data. So, i have created a pie chart with no Dimensions and 6 expressions formatted like this:

=sum({<Year={$(=max(Year))}>} Product1Revenue)

=sum({<Year={$(=max(Year))}>} Product2Revenue)

=sum({<Year={$(=max(Year))}>} Product3Revenue)

=sum({<Year={$(=max(Year))}>} Product4Revenue)

=sum({<Year={$(=max(Year))}>} Product5Revenue)

=sum({<Year={$(=max(Year))}>} Product6Revenue)

This works fine, and the pie chart is presented and if i hover over the sections, then i get the total value of that section.

What i am struggling with is also including a percentage included in the popup.

The percentage for product 1 would be the percentage of the total of the products put together.

Hope it makes sense.


Regards

Jason

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Jason,

unfortunately, in this configuration you can't also show the % in the popup. In order to achieve that, you'd need to replace multiple Expressions with a single Expression, add a Dimension and then you could have a secondary Expression with the calculation of the % share.

Since you need to calculate revenue differently for different products, you can use Pick(Match)) or a set of nested IF() statements to calculate the required amount for each one of the Dimension values.

cheers,

Oleg Troyansky

Learn Advanced Qlik techniques in my book QlikView Your Business

MK9885
Master II
Master II

You can get % for each expression but for Total of all Products you need to adjust your expression and make it to %

Properties>Numbers>Select your expression>Formatting to Number or Integer or Fixed to and below check 'Show in Percent %'

You'll have the value in %, if you trying to achieve % for each expressions on hover over.

Maybe add all the expressions(Products) to show the % for Product1?

rupamjyotidas
Specialist
Specialist

Instead of this

=sum({<Year={$(=max(Year))}>} Product1Revenue)

=sum({<Year={$(=max(Year))}>} Product2Revenue)

=sum({<Year={$(=max(Year))}>} Product3Revenue)

=sum({<Year={$(=max(Year))}>} Product4Revenue)

=sum({<Year={$(=max(Year))}>} Product5Revenue)

=sum({<Year={$(=max(Year))}>} Product6Revenue)

You can replace it with Dimension Product

and Equation as sum({<Year={$(=max(Year))}>} Revenue)

Then you can put Another Equation for your %

sum({<Year={$(=max(Year))}>} Revenue)/sum(TOTAL {<Year={$(=max(Year))}>} Revenue)