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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
sifatnabil
Specialist
Specialist

Top client in straight table

Hi all,

I have a straight table with SnapShotTime (a timestamp) as dimension, and max(bid) in expression, which returns the max bid for a given SnapshotTime. In a second expression, how do I return the client corresponding to the max(bid)?

Labels (1)
1 Solution

Accepted Solutions
Digvijay_Singh
MVP
MVP

attached is the qvw.

View solution in original post

7 Replies
Anil_Babu_Samineni
MVP
MVP

Use your second expression for sorting

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
sifatnabil
Specialist
Specialist
Author

Hi, what would the second expression be though? My internal table looks like the below - so I would want to retrieve client A and R in the second expression:

Internal table:

   

SnapShotTimebidClient
11:05:230.3E
11:05:230.2D
11:05:230.6A
11:05:230.4B
14:34:004T
14:34:005Q
14:34:007R
14:34:003G


What the straight table should show:

   

SnapShotTimeHighest bidClient
11:05:230.6A
14:34:007R

Hence I would like to know what expression would yield client A and R. Thanks.

vinieme12
Champion III
Champion III

Hi ,

Can you explain in detail how 0.6 and 7 by A and R are the highest bids? What is the logic here?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Digvijay_Singh
MVP
MVP

Not sure may be smthg like  - Only(if(bid=max(bid),Customer))

Digvijay_Singh
MVP
MVP

you can use firstsortedvalue -

Firstsortedvalue(Client,-bid)

sifatnabil
Specialist
Specialist
Author

Hi vinieme12 - the logic is to find the max(bid) for each SnapShotTime. So the max(bid) for 11:05:23 and 14:34:00.

Digvijay_Singh
MVP
MVP

attached is the qvw.