Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
wonkymeister
Contributor

Pivot Table with Column Percentages

Hi,

I have a pivot table, with YEAR across the top (3 years so 3 columns), with the user being able to select from a list of available dimensions down the side.

I need the % to calculate for each individual column (year), as opposed to a percentage of the total.

Any ideas?outcomes_pivot.PNG

1 Solution

Accepted Solutions
jmvilaplanap
Valued Contributor

Re: Pivot Table with Column Percentages

Then, the expression is: sum(Value)/sum(TOTAL <Year> Value)

Capture3.PNG

View solution in original post

10 Replies
jmvilaplanap
Valued Contributor

Re: Pivot Table with Column Percentages

As I can see, I think you are doing a percentage about the total, for example in the first cell is the percentage of the Stage 1 in 2015/6 about the total.

I think, you need only use the "function" TOTAL, for example: =sum(valueField)/sum(TOTAL valueField), isn't it?

Regards

wonkymeister
Contributor

Re: Pivot Table with Column Percentages

nope - tried that with no success

jmvilaplanap
Valued Contributor

Re: Pivot Table with Column Percentages

Could you give me a dataset for testing?

jmvilaplanap
Valued Contributor

Re: Pivot Table with Column Percentages

I tested and it works for me, I'll show you

Capture3.PNG

you can see the expressions at the top of the fields.

P.S. I'm sorry but I don't know how to upload a *.qvw file.

wonkymeister
Contributor

Re: Pivot Table with Column Percentages

sorry - want i want is the percentage of stage for that year only: like this:outcomes_pivot 2.PNG

jmvilaplanap
Valued Contributor

Re: Pivot Table with Column Percentages

Then, the expression is: sum(Value)/sum(TOTAL <Year> Value)

Capture3.PNG

View solution in original post

wonkymeister
Contributor

Re: Pivot Table with Column Percentages

Jose sir you are a legend.

thank you

jmvilaplanap
Valued Contributor

Re: Pivot Table with Column Percentages

You're welcome Phillip

wonkymeister
Contributor

Re: Pivot Table with Column Percentages

just a thought - can this be done in Set analysis also?