Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this dataset, in this example, when I choose the range of date picker on qlik sense from '27-Oct-24' to '2-Nov-24', what I need is to display the latest value of column population_m, which is '781'. I tried to sum max date but it sum all the value from '27-Oct-24' to '2-Nov-24'
Here is the data set
Area | Type | flock | current_state | date_calc | age_D | age_W | mortality_F | mortality_M | population_f | population_m |
L4 | MI | A | Growing | 27-Oct-24 | 28 | 5 | 1 | 0 | 1,154 | 783 |
L4 | MI | A | Growing | 28-Oct-24 | 29 | 5 | 0 | 1 | 1,154 | 782 |
L4 | MI | A | Growing | 29-Oct-24 | 30 | 5 | 0 | 0 | 1,154 | 782 |
L4 | MI | A | Growing | 30-Oct-24 | 31 | 5 | 1 | 0 | 1,153 | 782 |
L4 | MI | A | Growing | 31-Oct-24 | 32 | 5 | 0 | 0 | 1,153 | 782 |
L4 | MI | A | Growing | 1-Nov-24 | 33 | 5 | 1 | 0 | 1,152 | 782 |
L4 | MI | A | Growing | 2-Nov-24 | 34 | 5 | 0 | 1 | 1,152 | 781 |
Hi, you can use FirstSortedValue(population_m,-date_calc)
Max should work also: Only({<date_calc={"=Date(Max(date_calc),'D-MMM-YY')"}>} population_m)
Sum ({< date_calc = {'$(=date(maxstring(date_calc))'} >}population_m)
(I am assuming your date_calc is a field and that it is a date value and not only a string. )
Hi, you can use FirstSortedValue(population_m,-date_calc)
Max should work also: Only({<date_calc={"=Date(Max(date_calc),'D-MMM-YY')"}>} population_m)
The FirstSortedValue(population_m,-date_calc) work, somehow max is not work as I expected, thank you