# Qlik Sense App Development

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

Contributor

## 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.

Tags (5)
1 Solution

Accepted Solutions
Employee

## Re: Visualization & Percent of Total

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])

3 Replies
Employee

## Re: Visualization & Percent of Total

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])

Contributor

## Re: Visualization & Percent of Total

That worked (first one). Thanks!

Employee

## Re: Visualization & Percent of Total

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 !