Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
FirstSortedValue Not showing First "TOP USER" in textbox when two users have the same value. For example if Tom has 10 sessions and Harry has 9, my top user will display Tom, which is correct. If Tom and Harry both have 10, it doesn't show no one.
I've come across this before but it will take the first sorted by alphabet, how can i sort this out to only show one user?
Regards
='TOP USER: ' & FirstSortedValue([Name], -aggr(count( Session), [Name]))
How does this work? if A=1 and B=1? 1 Being "1" not 0.9178181 or 1.00000002525, Would the two 1's not keep going in parallel meaning they will always be the same?
Name itself will be ranked differently. For example
B = 1
A = 2
So if we have two John Smith's both with number 1, we are screwed? so it's fair to say this isn't 100% bulletproof? Don't get me wrong, I'm happy with the result, but I should be aware it's not 100% or is it?
Here is your bullet proof
='TOP USER: ' & FirstSortedValue(DISTINCT [Name], -aggr(Count( Session) + Rank([Name])/1E10, [Name]))
or
='TOP USER: ' & FirstSortedValue(DISTINCT [Name], -aggr(Count( Session) - Rank([Name])/1E10, [Name]))
Since the name is the same, doesn't matter which John Smith shows up, right
Or use Employee ID to differentiate between John Smiths
Hope I didn't offend you by saying bulletproof, but I'm sure you know where i'm coming from.
It's easier to read names to ID numbers when you got 5k employees.
I absolutely don't feel offended... I am glad you are thinking above and beyond.... I absolutely absolutely encourage you to do that
UPDATE: Made sure the above statement read right
Agreed!! but use that for sorting
='TOP USER: ' & FirstSortedValue(DISTINCT [Name], -aggr(Count( Session) + Rank(EmpID)/1E10, [Name]))
or
='TOP USER: ' & FirstSortedValue(DISTINCT [Name], -aggr(Count( Session) - Rank(EmpID)/1E10, [Name]))
I did and it works a treat.