Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ksmccann
Partner - Contributor III
Partner - Contributor III

Need relative expression in Pivot Tables

Hi All

    I have a straight table where I am summarizing survey responses. A survey can have multiple questions and each question can have multiple responses. I builtm a straight table that shows the question description and  the response text and then a count of how many reponses there are for that type of response. This all works fine. I then copy and paste the same expression and set it to relative so it shows me what percentage of that question the type of response represents. This also works fine. I then turned my straight table into a pivot table, and my relative expression becomes a count rather than a percent and the check box for relative actually disappears. Am I missing something here or do I have to manullay calculate percentages in the pivot table?

   If I do have to calculate manually how do I get the total count per question as the denominator, rather than the total count of all reposnes across all questions in the survey that I select? So essentially I need the row total as the denominator (where the row is each question). If I use count(total responseid) this does not give me the correct result as it gives me a percenatge against all reposnses for all questions rather than just the responses for each specific question that appears in the pivot table.

     Thanks for your help.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try a total qualifier with field list, something like

=count(total<question> responseid)

View solution in original post

4 Replies
swuehl
MVP
MVP

Try a total qualifier with field list, something like

=count(total<question> responseid)

ksmccann
Partner - Contributor III
Partner - Contributor III
Author

Thanks for the help, this was exactly what I needed it. Funny how you have to do this manually when you switch to the pivot table.

gargi_bardhan
Creator
Creator

Hi ,

Did you get any solution to this i.e how to resolve relative issue in pivot table

Regards,

Gargi

ksmccann
Partner - Contributor III
Partner - Contributor III
Author

yes, the solution above worked as required.