Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
leobrand
Contributor III
Contributor III

Percentage in pivot table

I have a table with a few hundred rows of data and a field named “Dinosaur Type” that contains the contents Saurischia or Ornithischia only. 

I created a pivot table with Saurischia or Ornithischia in the row and I want an expression that will show me what percent of the table is Saurischia and what percent of the table is Ornithischia.

I tried the expression below but it is not working.  Can you help?

Count(If(Match([Dinosaur Type]), ‘Saurischia’, ‘Ornithischia’),1,0)/Count(Total[Dinosaur Type])

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi

assuming the [Dinosaur Type] is a field in the data that connected to the data

this function should work

count ([Dinosaur Type])/count(total [Dinosaur Type])

if you want the percentage in any column to be 100%

you'll need something like

count ([Dinosaur Type])/count(total <attribute field >[Dinosaur Type])

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

assuming the [Dinosaur Type] is a field in the data that connected to the data

this function should work

count ([Dinosaur Type])/count(total [Dinosaur Type])

if you want the percentage in any column to be 100%

you'll need something like

count ([Dinosaur Type])/count(total <attribute field >[Dinosaur Type])

big_dreams
Creator III
Creator III

or

count ([Dinosaur Type])/count({1} [Dinosaur Type])


Regards,