Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jcampbell
Partner - Creator
Partner - Creator

Visualization & Percent of Total

I'm having trouble trying to get a visualization in Qlik Sense to display the percent of total. Here's what I have:

1. Dimension: Product

2. Spend: Sum({<[Mode (Trip)]={'A'}>}[Paid Fare])

This correctly displays the total spend by product in a horizontal bar chart. However, I'd like to show the percent of total spend by product. This was more obvious in QlikView but I'm having difficulty learning how to do this in Qlik Sense.

Thanks for your suggestions.

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

Hi ,  in QlikView there was a 'relative' checkbox to quickly convert. In qlik sense you need to write it into the expression. Try both of the following.  You'll need to format as a percent if it works too...

Sum({<[Mode (Trip)]={'A'}>}[Paid Fare])

/

Sum( total  {<[Mode (Trip)]={'A'}>}[Paid Fare])

OR

Sum({<[Mode (Trip)]={'A'}>}[Paid Fare])

/

Sum( total  <Product>  {<[Mode (Trip)]={'A'}>}[Paid Fare])

View solution in original post

3 Replies
JonnyPoole
Employee
Employee

Hi ,  in QlikView there was a 'relative' checkbox to quickly convert. In qlik sense you need to write it into the expression. Try both of the following.  You'll need to format as a percent if it works too...

Sum({<[Mode (Trip)]={'A'}>}[Paid Fare])

/

Sum( total  {<[Mode (Trip)]={'A'}>}[Paid Fare])

OR

Sum({<[Mode (Trip)]={'A'}>}[Paid Fare])

/

Sum( total  <Product>  {<[Mode (Trip)]={'A'}>}[Paid Fare])

jcampbell
Partner - Creator
Partner - Creator
Author

That worked (first one). Thanks!

JonnyPoole
Employee
Employee

cool. the 2nd one is if you have a chart with multiple dimensions (Product and something else) , it will do a percent of subtotal based on the individual product totals . good luck !