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

how to get first occurrence values from the field?

Hi,

   I have a table that consist columns like

productid , productname

001,           chairs

002,           chairs

003,           chairs

004,            cots

005,            cots

006,            tables

007,            tables

I need output like below

productid, productname

001,          chairs

004,           cots

006,            tables


thanking you,

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Or Front-End this?

Create straight table

Dim as productid

Expression is --> FirstSortedValue(productname,Aggr(Sum(productid),productname))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

2 Replies
sushil353
Master II
Master II

Hi,

Try this:

LOAD *

where key  =1;

LOAD AutoNumber(productid,productname) as key, * Inline

[

productid , productname

001,           chairs

002,           chairs

003,           chairs

004,            cots

005,            cots

006,            tables

007,            tables

];

HTH

Sushil

Anil_Babu_Samineni

Or Front-End this?

Create straight table

Dim as productid

Expression is --> FirstSortedValue(productname,Aggr(Sum(productid),productname))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful