Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to show latest value in text object from given below table.
I want to show only latest day value without any selection. In my scenario, I have 26.02.2020 latest day.
I tried with this expression but doesn't work:
Only({<Dim3 = {'=Max(Dim3)'}>} Values)
Dim 1 | Dim 2 | Dim 3 | Values |
A | AA | 26.02.2020 | 5 |
A | AA | 24.02.2020 | 3 |
A | AA | 16.02.2020 | 2 |
A | AA | 01.02.2020 | 4 |
A | AA | 18.01.2020 | 6 |
You want to enclose Max(Dim3) in a $-expansion, like this:
Only({<Dim3 = {'$(=Max(Dim3))'}>} Values)
Hi @ahmd, you need to use dollar sign expansion to include the max date in your selection, something like this:
Only({<Dim3 = {'$(=Max(Dim3))'}>} Values)
And if you want to get this value, independently from the user selection, you have to use the 1 modifier:
Only({1<Dim3 = {'$(=Max(Dim3))'}>} Values)
JG
Hi @GaryGiles / @JuanGerardo ,
It works only for the Single value. But, if there are more values then what should be the expression?
For example:
26.02.2020 is the max date for Dim 1 = A, Dim2 = AA, Values = 5
24.02.2020 is the max date for Dim 1 = B, Dim2 = BB, Values = 3
02.02.2020 is the max date for Dim 1 = C, Dim2 = CC, Values = 1
So, the result should be sum of 5 + 3 + 1 = 9.
Dim 1, Dim 2, Dim 3, Values
A, AA, 26.02.2020, 5
A, AA, 24.02.2020, 3
A, AA, 16.02.2020, 2
A, AA, 01.02.2020, 4
A, AA, 18.01.2020, 6
B, BB, 24.02.2020, 3
B, BB, 23.02.2020, 4
C, C, 02.02.2020, 1
C, C, 01.02.2020, 4
Like:
=Sum(Aggr(FirstSortedValue(Values,-[Dim 3]), [Dim 2]))
Hi @tresesco ,
it returns me 0 Values.
For me - 9
Please be convinced that you are doing something wrong in your expression or not explaining the entire scenario. With just 'Sill I am receiving 0' , it is going to be very hard for us here to understand what could be the reason.