Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percentage calc in charts

Hi,

I am trying to get percentage calculation in my chart in the attached sample. When I use expression for amount in currency (1st expression), it works but not when in I use expression to calculate revenue percentage for each country compared revenue of USA (2nd expression). If I check out the percentages for individual countries compared to revenue of USA in text box, it displays the values but this is not seen in the chart. Any idea?

Thanks,

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Sum(Revenue)/Sum(TOTAL {<[Country]={'USA'}>} Revenue)


Capture.PNG

View solution in original post

5 Replies
oknotsen
Master III
Master III

I downloaded your QVW and I can not find an expression set to show as "relative percentage".

Do you mean the bar chart and if so, which of the two expressions, or the pivot table?

May you live in interesting times!
sunny_talwar

Try this:

Sum(Revenue)/Sum(TOTAL {<[Country]={'USA'}>} Revenue)


Capture.PNG

vkolasani
Contributor III
Contributor III

Which Chart are you using?

Thanks,

Venu

oknotsen
Master III
Master III

Is this what you had in mind?

If so, you forgot to actually check "relative".

May you live in interesting times!
vkolasani
Contributor III
Contributor III

Sum(Revenue)/Sum(Total Revenue) Should also work.

Thanks,

Venu