Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

First and Last value

Hi all.

I have a table:

DateValue 1Value 2
01-01-20141-
02-01-20142-
03-01-201412
04-01-20144-
05-01-20141-
06-01-20146-
07-01-20142-
08-01-201484
09-01-20145-
10-01-20146-

I want see:

1) In first text object - first value on column "Value 2" - that is "2"

2) In second text object - last value on column "Value 2" - that is "4"

I have a NULL value (or non value) in column "Value 2"!!!

Any idea how it do?

I need use function: FirstSortedValue([Value 2], Date) ???

But i see "-".

Thank you.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

FirstSortedValue({<[Value 2]-={'-'}>}[Value 2],Date) , and

FirstSortedValue({<[Value 2]-={'-'}>}[Value 2],-Date)

View solution in original post

6 Replies
amit_saini
Master III
Master III

Dmitry,

Try this:

Checked "Suppress When Value us Null " option and see the result.

Thanks,
AS

Not applicable
Author

Amit, thank you.

But it works in Pivot table.

I need in different text object:

2

4
tresesco
MVP
MVP

Try like:

FirstSortedValue({<[Value 2]-={'-'}>}[Value 2],Date) , and

FirstSortedValue({<[Value 2]-={'-'}>}[Value 2],-Date)

ashfaq_haseeb
Champion III
Champion III

Hi,

May be like this.

Regards

ASHFAQ

simenkg
Specialist
Specialist

in your script, create a flag:

load

...

if(isnull(Value 2), 0,1) as ValidValue2Flag,

...

From Input.

Then you use

FirstSortedValue({$<ValidValue2Flag={1}>}[Value 2],Date)

Not applicable
Author

Tresesco Thank you!

It work.

Can you explain me this expression: {<[Value 2]-={'-'}>}

I'm confused by in the signs...