Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Metric with filter

Hello,

I want to show a value in % that will describe how much of sales is in US vs. all countries. This is just an example scenario.

Please see grid below. Country and Sales are column names taken from warehouse.

Country               Sales

US                    1,000,000
Canada              5,000
Germany            6,500
China                12,000

Metric that I want to build is an expression:  SUM (Sales) where {Country = US} / SUM (Sales)(Sales for all countries). Can you please paste me the script that I need to put in my expresion in grid? I am still using free version of QlikView so I can’t really open any example made in this tool.

Thanks!

1 Solution

Accepted Solutions
rubenmarin

Hi, not sure to understand the requirements, you want a expression like:

Sum(TOTAL {<Country={'US'}>} Sales)/Sum(TOTAL Sales)

View solution in original post

1 Reply
rubenmarin

Hi, not sure to understand the requirements, you want a expression like:

Sum(TOTAL {<Country={'US'}>} Sales)/Sum(TOTAL Sales)