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: 
geogou1973
Creator
Creator

First value in all line of a table

Hello,

I have the following table 

DATE ITEM PRICE FirstSortedValue(PRICE,ITEM_ID)
01/09/2021 1420211 1,52 1,52
02/09/2021 1420211 1,52 1,52
03/09/2021 1420211 1,52 1,52
04/09/2021 1420211 1,52 1,52
05/09/2021 1420211 1,52 1,52
06/09/2021 1420211 1,52 1,52
07/09/2021 1420211 1,52 1,52
08/09/2021 1420211 1,52 1,52
09/09/2021 1420211 1,52 1,52
10/09/2021 1420211 1,52 1,52
11/09/2021 1420211 1,52 1,52
12/09/2021 1420211 1,52 1,52
13/09/2021 1420211 1,596 1,596

 

I want to have the first value by ITEM in all lines of the table.

When i write the expression FirstSortedValue(PRICE,ITEM_ID) in the last line that the price is different does not work to give me also the price 1,52 . How can i achieve this ?

Thank you in advanced.

 

1 Reply
geogou1973
Creator
Creator
Author

I found the solution with the expression 

aggr(nodistinct FirstSortedValue(PRICE,Rank,1),ITEM_ID)

In the script i rank the lines by ITEM and DATE