Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!!
I have the next situation.. In a straight table with the Dimension of ID, i need add a expression that get the last value of the field Result like the next example.
ID Month Result
1 Jan -
1 Feb 5
1 Mar 2
1 Apr -
1 May 4
1 Jun -
The result tha i expect is:
ID Result
1 4
Thanks in advance.
try,firstsortedvalue() with -1,pls look at reference manual for syntax.
Hi
Try this expression
Sum({<Month={'may'}>}Result)
and see the attached file
Hola Julián,
intenta con
=only( {<Month={$(=max({<Result={">0"}>} Month))}>}Result)
Saludos
Hi Julian,
You could try to add a flag when loading the data. For instance if you called this flag "_MaxResult" the set expression that you need would be very simple:
sum({<_MaxResult = {1}>} Result)
And you will get the output that you need. This will also work if you need to visualize the last results for multiple IDs.
Review the attached filed for more details about the scripting used to generate the flag.
Best Regards
Hola Alejandro,
De este modo me funciona sólo si la tabla tiene un ID, pero para varios ID's no funciona.
ID Month Result
1 Jan -
1 Feb 5
1 Mar 2
1 Apr -
1 May 4
1 Jun -
2 Jan -
2 Feb 3
2 Mar -
2 Apr -
En este caso obtiene a Mayo como el mes máximo con algún valor, entonces el resultado de la tabla solo va a traer el valor para el ID = 1.
Lo que espero es una tabla con el último valor para cada ID.
1 May 4
2 Feb 3