Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

FirstSortedValue

Hi All,

Please see attached table.

I have a table with the data in Columns A - D, and I want to return the values in Columns E and F.

I have tried using FirstSortedValue, which seems logically to be the function I should use, but I am not getting any returns.

Column E shows the minimum YearPeriod value in Column A for the Group in Column C.

In fact, all returns are "201001" because that is the minimum YearPeriod value for each Group.

Likewise, Column F shows the minimum YearPeriod value in Column A for the Type in Column D.

This time, there are some returns that are not "201001" (coloured) because there is no such YearPeriod value for these types.

In QlikView-speak, I have unsuccessfully used the following:

FirstSortedValue(TOTAL YearPeriod, Group)

...and, of course Type in place of Group for the second case.

Yet again I am doing something wrong... yet again I throw myself at the feet of the all powerful community.

Help Please!

8-)

Dave

QlikView for Windows Version 9.00.7646.9 SR6

Message was edited by: davewright - typo

1 Solution

Accepted Solutions
MVP
MVP

FirstSortedValue

try

=min(total<Group> YearPeriod)

resp.

=min(total<Type> YearPeriod)

as expressions.

Regards,

Stefan

4 Replies
MVP
MVP

FirstSortedValue

Hi Dave,

unfortunately, I can't see your attached table, could you check this please?

Please note that the Help states about FirstSortedValue:

"...If more than one value of expression share the same lowest sort-order, the function will return null...."

Could this be a problem with your data?

Regards,

Stefan

Not applicable

Re: FirstSortedValue

What an idiot!!!

THIS time I will attach the file.

I suspect, Stefan, that you are right, but I'll let you have a look.

Thanks.

Dave

MVP
MVP

FirstSortedValue

try

=min(total<Group> YearPeriod)

resp.

=min(total<Type> YearPeriod)

as expressions.

Regards,

Stefan

Not applicable

FirstSortedValue

Of course...