Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)?
attached is the qvw.
Use your second expression for sorting
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:
| SnapShotTime | bid | Client |
| 11:05:23 | 0.3 | E |
| 11:05:23 | 0.2 | D |
| 11:05:23 | 0.6 | A |
| 11:05:23 | 0.4 | B |
| 14:34:00 | 4 | T |
| 14:34:00 | 5 | Q |
| 14:34:00 | 7 | R |
| 14:34:00 | 3 | G |
What the straight table should show:
| SnapShotTime | Highest bid | Client |
| 11:05:23 | 0.6 | A |
| 14:34:00 | 7 | R |
Hence I would like to know what expression would yield client A and R. Thanks.
Hi ,
Can you explain in detail how 0.6 and 7 by A and R are the highest bids? What is the logic here?
Not sure may be smthg like - Only(if(bid=max(bid),Customer))
you can use firstsortedvalue -
Firstsortedvalue(Client,-bid)
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.
attached is the qvw.