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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

percentage vs dimension value

  Hello

How do i get an expression to calculate the same result as the column 'vs France'

sales (kE)vs France
France200100,00%
uk300150,00%
belgiuem10050,00%

Tahnks in advance for your help

3 Replies
sunny_talwar

Try this:

Table:

LOAD * Inline [

Country, Sales

France, 200

UK, 300

Belgium, 100

];

Join (Table)

LOAD Sales as FranceSales

Resident Table

Where Country = 'France';

FinalTable:

LOAD Country,

  Sales,

  Num(Sales/FranceSales, '#.00%') as [vs France]

Resident Table;

DROP Table Table;


Capture.PNG

sinanozdemir
Specialist III
Specialist III

And here is the front-end solution in QlikSense:

Capture.PNG

In the expression (vs France), I typed the below:

Capture.PNG

I am also attaching qvf.

Hope this helps.

Not applicable
Author

sum( [sales (kE) ]   / sum( { < country = { 'France' } > } [sales (kE)]