Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

First Sorted Value

Hi

I am trying to get the first sorted value in the text box , can I know why its not being shown ?

Attached my App

Thanks

9 Replies
swuehl
MVP
MVP

Try

=FirstSortedValue(DISTINCT Function,ServiceTimeSeries.Date)

swuehl
MVP
MVP

Seems to work for me

swuehl
MVP
MVP

Your sort weight is Date, but there are several functions with the same highest date.

You want the function the sorts first by text A-Z?

Anonymous
Not applicable
Author

Yes , Function sort by Date, and if multiple values sort by A-Z

swuehl
MVP
MVP

It took some time to sort out how your chart works (and that you are using alternate states in your sheet).

You are using QV12, right?

Then maybe you can use the new sortable aggr() function.

The sortable Aggr function is finally here!

See attached.

Anonymous
Not applicable
Author

I am actually using Qlikview 11.2 , the expression in the text box shows an error , sorry I should have told you that I have alternate states for the Tab.. but just out of curiosity can I know how it matters ?

swuehl
MVP
MVP

Your text box was originally set to inherited state, and your sheet was not set to the same state as the table chart. The default state shows a lot more and different selections than visible in your sheet, hence filtering your table in a different way than the records available to  the firstsortedvalue() function.

With QV12, it now works for me.

I know that the sorted aggr() doesn't work in 11.2, but my time is up, I am out of the game.

prabhas277
Creator
Creator

It will give the first value of the expression based on sorted weight ,sorted weight should be numeric...

Anonymous
Not applicable
Author

How do I sort by alphabetically considering date as sort weight ?