Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
brucemeyers
Contributor II
Contributor II

Sum goals scored exclude country

Greetings Giovanne Bergstein,

I want to modify your expression

Sum({$<NumDate= {$(=(Max([NumDate])))}>}[Goals Scored])

To exclude England, here is my attempt

IF([Country] <> ‘England’, Sum({$<NumDate= {$(=(Max([NumDate])))}>}[Goals Scored])

The expression editor indicates the expression is ‘OK’ but it blanks out the table values after I click Apply

I want the modified expression to produce this table

Country

Goals Scored

Belgium

4

Brazil

1

Croatia

10

England

0

France

7

Russia

5

Sweden

0

Uruguay

0

Notice England has 0 Goals Scored instead of 3 as it would with your original expression

Here is my data

Date

Country

Goals Scored

7/15/2018

France

4

7/15/2018

Croatia

2

7/14/2018

Belgium

2

7/14/2018

England

0

7/11/2018

England

1

7/11/2018

Croatia

2

7/10/2018

France

1

7/10/2018

Belgium

0

7/7/2018

Sweden

0

7/7/2018

England

2

7/7/2018

Russia

5

7/7/2018

Croatia

6

7/6/2018

Uruguay

0

7/6/2018

France

2

7/6/2018

Brazil

1

7/6/2018

Belgium

2

Can you help?

1 Solution

Accepted Solutions
PrashantSangle

try below

Sum({$<country-={'England'},NumDate= {$(=(Max([NumDate])))}>}[Goals Scored])


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

1 Reply
PrashantSangle

try below

Sum({$<country-={'England'},NumDate= {$(=(Max([NumDate])))}>}[Goals Scored])


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂