Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Here is my expression, that’s not working
Sum({$<[Date]={$(=Max([Date]))}>}[Goals Scored])
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 |
I want to create a measure in a Table chart that will sum the ‘Goals Scored’ of the most recent ‘Date’ for each country.
Using the data above my Table chart should look like this …
Country | Goals Scored |
Belgium | 0 |
Brazil | 0 |
Croatia | 2 |
England | 0 |
France | 4 |
Russia | 0 |
Sweden | 0 |
Uruguay | 0 |
Can you help?
=Sum({$<[Date]={"$(=Max([Date]))"}>}[Goals Scored])
=Sum({$<[Date]={"$(=Max([Date]))"}>}[Goals Scored])
=Sum({1<[Date]={"$(=Max([Date]))"}>}[Goals Scored])
Qlik with dates fields when we use the max function it transforms into numerical value causing problems in the relation so I suggest using fields num to date.
Do it
in the source table create a field in a (Date) as NumDate
use it in set analysis
Sum({$<NumDate= {$(=(Max([NumDate])))}>}[Goals Scored])
Your problem will be solved.
Regards