# Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable

## How to show Contribution in Pie Chart in Qlik View?

Hello all,

I am working with Qlik View 11 Personal Edition I have the data like this

Age GroupNumber of Students
20-2230
23-2520
25 and above50

Now I want to show a pie chart to represent contribution.

i.e., if I select "20-22" from the list box, pie chart should show two parts 20-22 (30%) and Others (70%).

I tried "Dimension Limits" by selecting "First" "1" values and "Show Others". But now luck.

Any clues?

Tags (2)
1 Solution

Accepted Solutions
MVP

## Re: How to show Contribution in Pie Chart in Qlik View?

You should be able to do this with a Calculated Dim of:

=aggr(if(only({1}[Age Group])=[Age Group],[Age Group],'Others'),[Age Group])

and an Expression of

sum({1}[Number of Students])

with Relative checked.

See attached example.

-Rob

http://robwunderlich.com

9 Replies
Honored Contributor II

## Re: How to show Contribution in Pie Chart in Qlik View?

Use alternate states

Honored Contributor II

## Re: How to show Contribution in Pie Chart in Qlik View?

In pie chart your requeriment aren't possible, but yes in pivot table as this:

Honored Contributor III

## Re: How to show Contribution in Pie Chart in Qlik View?

you can store grand total in variable vgtot  and use this variable as fourmula   no of students/ vgtot  in number format choose show in %

Hope this helps you

Vikas

Not applicable

## Re: How to show Contribution in Pie Chart in Qlik View?

Hi,

Thank you for the solution. Is it possible to show the totals as percentage?

Not applicable

## Re: How to show Contribution in Pie Chart in Qlik View?

Hi Vikas,

Thank you for the solution. I tried it but no luck.

MVP

## Re: How to show Contribution in Pie Chart in Qlik View?

You should be able to do this with a Calculated Dim of:

=aggr(if(only({1}[Age Group])=[Age Group],[Age Group],'Others'),[Age Group])

and an Expression of

sum({1}[Number of Students])

with Relative checked.

See attached example.

-Rob

http://robwunderlich.com

Honored Contributor II

Yes ..

Employee

## Re: How to show Contribution in Pie Chart in Qlik View?

Hi Ravindra

I think the following is exactly what you are looking for.

Please let me know if you need anything else.

Thanks

Agis

Not applicable

## Re: How to show Contribution in Pie Chart in Qlik View?

Thank you so much.