Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

brucemeyers
New Contributor

Calculate points if less than or equal to 3

If ‘Goals Scored’ is less than or equal to 3 I want the expression below to calculate otherwise do nothing

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

Here is my expression that the expression editor says OK for but when I click Apply, it does not work

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

Here is my data

 

DateCountryGoals Scored
7/15/2018France4
7/15/2018Croatia2
7/14/2018Belgium2
7/14/2018England0
7/11/2018England1
7/11/2018Croatia2
7/10/2018France1
7/10/2018Belgium0
7/7/2018Sweden0
7/7/2018England2
7/7/2018Russia5
7/7/2018Croatia6
7/6/2018Uruguay0
7/6/2018France2
7/6/2018Brazil1
7/6/2018Belgium2

Using the data above my Table chart should look like this …

CountryGoals Scored
Belgium4
Brazil
Croatia4
England3
France3
Russia
Sweden
Uruguay

Can you assist?

1 Solution

Accepted Solutions
YoussefBelloum
Esteemed Contributor

Re: Calculate points if less than or equal to 3

Hi,


=IF ([Goals Scored]<=3,), Sum({$<NumDate= {'$(=(Max([NumDate])))'}>}[Goals Scored])


a comma to remove and two simple quotes to add

1 Reply
YoussefBelloum
Esteemed Contributor

Re: Calculate points if less than or equal to 3

Hi,


=IF ([Goals Scored]<=3,), Sum({$<NumDate= {'$(=(Max([NumDate])))'}>}[Goals Scored])


a comma to remove and two simple quotes to add