Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mattcorke
New Contributor II

Pivot table percentages from count of values

Hi there,

I'm trying to create a pivot table that shows the percentage of a count of values. The rows should equal 100% (for each date).

pivot table percentages.jpg

At the moment I've used this:

Count(Attainment) / count(total <[Pupil report data.Subject]> Attainment)

This isn't working as it is returning a total of 100% for every value in the pivot table, not by row or subject.

Any ideas would be much appreciated!

Many thanks

Matt

9 Replies

Re: Pivot table percentages from count of values

What all dimensions do you have in this chart?

mattcorke
New Contributor II

Re: Pivot table percentages from count of values

For the rows, the dimensions are:

  • Pupil assessment data.Subject
  • Report Cycle.autoCalendar.YearMonth

And the column dimension is 'Attainment'

Thanks

Matt

mattcorke
New Contributor II

Re: Pivot table percentages from count of values

Does have anyone have any nuggets of info they could offer?

Thanks

Matt

zebhashmi
Valued Contributor

Re: Pivot table percentages from count of values

Can you share some sample table?

stigchel
Honored Contributor

Re: Pivot table percentages from count of values

Try with

Count(Attainment) / count(total <[Report Cycle.autoCalendar.YearMonth]> Attainment)

clondono
Contributor III

Re: Pivot table percentages from count of values

Try:

Sum(Attainment) / Sum(Total Attainment)


it should work for you. Don't forget to format the number as %

mattcorke
New Contributor II

Re: Pivot table percentages from count of values

Hi,

Unfortunately this doesn't work... The result is the same as in the example I showed.

Matt

mattcorke
New Contributor II

Re: Pivot table percentages from count of values

Hi Carlos,

Unfortunately, this also doesn't work. I have the same result as above.

Matt

mattcorke
New Contributor II

Re: Pivot table percentages from count of values

Yes, I'll remove names etc. from the data and upload it ASAP.

Thank you,

Matt

Community Browser