# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New 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
Highlighted Employee

## Re: Pie Charts: Showing Percentage of Two Values

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

6 Replies Partner

## Re: Pie Charts: Showing Percentage of Two Values

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

Regards

Highlighted Employee

## Re: Pie Charts: Showing Percentage of Two Values

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

New Contributor II

## Re: Pie Charts: Showing Percentage of Two Values

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

Contributor II

## Re: Pie Charts: Showing Percentage of Two Values

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

## Re: Pie Charts: Showing Percentage of Two Values

Hi,

See if you can help with following question

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

## Re: Pie Charts: Showing Percentage of Two Values

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 ?