Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Show Percentage?

Hi,

I have a data of different vendors from different countries with their respective invoice amounts. Is it possible to show the percentage of a respective vendor to the total of its country?

If I select vendor ABC Ltd, I want to see it's share of 10% of total invoice amount in US.

Thanks for the help

1 Solution

Accepted Solutions
sunny_talwar

May be you have to ignore selection in Vendor field in the denominator expression?

Sum([Invoice Amount])/Sum(TOTAL <Country> {<Vendor>} [Invoice Amount])

View solution in original post

12 Replies
sunny_talwar

May be like this:

Dimension:

Vendor

Country

Expression:

Sum([Invoice Amount])/Sum(TOTAL <Country> [Invoice Amount])

vinieme12
Champion III
Champion III

Sample data with expected o/p please

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Hi Sunny,

The formula doesn't work when I select a particular vendor, it shows 100%.

What I am looking for is as follows, let's say Australia has 5 vendors

A, B, C, D,E with 10 USD each, so if I select vendor A, the percentage of the vendor in that country should be 20%.

Hope that clarifies

sunny_talwar

May be you have to ignore selection in Vendor field in the denominator expression?

Sum([Invoice Amount])/Sum(TOTAL <Country> {<Vendor>} [Invoice Amount])

Anonymous
Not applicable
Author

Here you go Vineeth

vishsaggi
Champion III
Champion III

Did you try using Sunny's expression?

Extending his expression find the attached file and let us know if this is what you are looking for?

vinieme12
Champion III
Champion III

Same as Sunny's Expressions

sum([Invoice Amount USD])

/

sum({<Vendor>} TOTAL <Location> [Invoice Amount USD])

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Thank you both for the formula, it works fine. Can you suggest a small tweak to it though?

What if I want to look at only some particular vendors in the chart?  I am using the following formula in another chart, can we modify your formula based on that? I tried adding another expression but that didn't work

sum({<[Vendor Name] = {"*DELL*","*MICROSOFT*"}>}[Invoice Amount USD])

Anonymous
Not applicable
Author

Use single quotes instead...