Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

First Sorted Value returning NULL

Hello.

With the user's help Sunny, function firstsortedvalue takes the highest value of the highest date that occurs on a table, but many times the value of the expression returns null, the model presented in the previous question I had only integer values, but I own decimals values, there is a problem in function to decimal values?

Formula:

FirstSortedValue (Value - (Date * 10000 + Value))

1 Solution

Accepted Solutions
Highlighted

Re: First Sorted Value returning NULL

May be use DISTINCT?

FirstSortedValue(DISTINCT Value - (Date * 10000 + Value))

If that doesn't work, would you be able to share how your data look like (where it doesn't work)

View solution in original post

4 Replies
Highlighted

Re: First Sorted Value returning NULL

May be use DISTINCT?

FirstSortedValue(DISTINCT Value - (Date * 10000 + Value))

If that doesn't work, would you be able to share how your data look like (where it doesn't work)

View solution in original post

Highlighted

Re: First Sorted Value returning NULL

One reason this isn't working could be the fact the Date is not read as Date. Make sure Date is a dual field with numeric value. Check these links:

Dates in Set Analysis

Why don’t my dates work?

Highlighted
Not applicable

Re: First Sorted Value returning NULL

Works!

But what's the difference using distinct in this function?

Highlighted

Re: First Sorted Value returning NULL

As this has decimal values, it might be finding difficult to choose between two very close values

For example: 10.99999999999 and 10.99999999998. Distinct just help the expression choose one of them randomly.