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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar chart showing all dimensions while calculating % of total

Hi. I created a bar chart using "country" as dimension, with selections on "year" and "product". The fact is "sales".

I created a bar chart to show sales of countries, and forcing the x-axis to show all countries regardless of which country I selected in the list box as follows:

Sum({$<country=>} sales)

It worked fine. But now I would like the bar chart to show as a percentage of each country against the total of all countries. What should I put as the denominator in the expression? Normally just the expression "Sum({$<country=>} sales)" itself in a textbox will show the total of all sales according to the year and product selected, but since in the bar chart I already have that in the numerator.. I am a bit confused.

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Solved. Just learnt the TOTAL syntax can be used in this context.

View solution in original post

3 Replies
Not applicable
Author

Solved. Just learnt the TOTAL syntax can be used in this context.

Anil_Babu_Samineni

Cool, Please flag correct answer of your Answer. So that peoples can understand next wards

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dineshmdane
Partner - Contributor III
Partner - Contributor III

'Relative' option under expression tab will do the same.

I am not sure about my answer. Please, respond if the answer is wrong.


Thanks & Regards

Dinesh M