Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Communities,
I tried to use FirstSortedValue function to find the max date and max value correspondingly of multiple dimensions.
However, there're missing value in the result.
I'm wondering if there's another function could be applied for multiple dimensions(4 dimensions)?
************ Original Expression **************
Max Date: = Max(Date)
Max Value: = FirstSortedValue(Value, -(Date*10000+Value))
************ Original Expression **************
Thanks in advanced.
What if you add DISTINCT here
FirstSortedValue(DISTINCT Value, -(Date*10000+Value))
hello
if you are in a chart, maybe you could use it in combination with aggr() function
What exactly are you looking to get? Max Value on the Max Date?
Hi Sunny,
Yes, I'm looking for max value on max date.
What if you add DISTINCT here
FirstSortedValue(DISTINCT Value, -(Date*10000+Value))
Hi Sunny,
It works perfectly.
May I ask why should we add distinct in the expression?
It might be possible that the Max(Value) on Max(Date) might repeat more than once... if that is the case, FirstSortedValue() needs DISTINCT to show the value... it's just how the function behaves.