Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
D_Williams
Partner - Contributor
Partner - Contributor

Percentages in two columns in a pivot table

I have a pivot table that's showing details of edits done to some data. The rows show the edit reason and there are two columns: one that looks at the last 7 days, and the other looks at earlier data.

When I simply want a count it all works fine, but what I'm after now is to add percentages. If I try this:

count(reasoncode)/count(Total(reasoncode))

it gives me a percentage for each cell based on the total number of edits irrespective of the date. (see below) What I need is a way to divide by the total edits within the timeframes specified by the columns.

Averages.PNG

 

cheers

1 Reply
lorenzoconforti
Specialist II
Specialist II

Looks like Last7 and Earlier are defined as dimensions; try define them as measures (i.e. create two measure with set expression within them)