Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
jasonwills
Contributor II
Contributor II

Pie Charts: Showing Percentage of Two Values

Hi All,

I have data in two tables, which is all sales data.

I can show the Sum(Revenue) for each table, which is fine.

The problem comes when I'd like to show these in a pie chart.

for example

if Sum(Revenue) come to 75000 and Sum(OtherRevenue) comes to 25000, then I'd like to pie chart to show 75% and 25% for them..

Anyone have any pointers?

Many Thanks

Jason

1 Solution

Accepted Solutions
Masaki_Hamano
Employee
Employee

On QlikView, you can set multiple measures with no dimension for a pie chart, but on the other hand, you can only set one measure with a dimension as a mandatory input on Qlik Sense.

So, one way to pile up measure values on Qlik Sense pie chart is to use ValueList function as the following example:

Dimension: =ValueList('Revenue','OtherRevenue')

Measure: IF(ValueList('Revenue','OtherRevenue')='Revenue',Sum(Revenue), Sum(OtherRevenue))

Here is an explanation on ValueList().

ValueList() – For those tricky situations

View solution in original post

6 Replies
maximiliano_vel
Partner - Creator III
Partner - Creator III

Create the Pie with no dimensions and the two expressions you need.

Regards

Masaki_Hamano
Employee
Employee

On QlikView, you can set multiple measures with no dimension for a pie chart, but on the other hand, you can only set one measure with a dimension as a mandatory input on Qlik Sense.

So, one way to pile up measure values on Qlik Sense pie chart is to use ValueList function as the following example:

Dimension: =ValueList('Revenue','OtherRevenue')

Measure: IF(ValueList('Revenue','OtherRevenue')='Revenue',Sum(Revenue), Sum(OtherRevenue))

Here is an explanation on ValueList().

ValueList() – For those tricky situations

jasonwills
Contributor II
Contributor II
Author

Hi Masaki,

worked a treat, many thanks for that.

And thankyou for the detailed response and pointer to the ValueList function - I'm sure that's going to help me out a lot.

Thanks again.

Jason

luizcdepaula
Creator III
Creator III

Masaki,

It worked like a charm. I just would like to add that you can used with as many measures as you want. All you have to do is nest the IF statements.

ex:

     Dimension=  ValueList('[Total Base Charges]','[Total Accessorials]','[Total Fuel Surcharges]')

     Measure=

IF(ValueList('[Total Base Charges]','[Total Accessorials]','[Total Fuel Surcharges]')='[Total Base Charges]',

Sum([Total Base Charges]),

If(ValueList('[Total Base Charges]','[Total Accessorials]','[Total Fuel Surcharges]')='[Total Accessorials]',

Sum([Total Accessorials]),

If(ValueList('[Total Base Charges]','[Total Accessorials]','[Total Fuel Surcharges]')='[Total Fuel Surcharges]',

Sum([Total Fuel Surcharges]))))

Thanks for the tip

Not applicable

Hi,

See if you can help with following question

How to make pie chart of sum of metrices as dimensions ?

Not applicable

Hi,

See, if you can help on this quesion, it is on similar lines as this post

How to make pie chart of sum of metrices as dimensions ?