Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In case there is a sale with the same orderID and Unique which are associated with two teams, I want to display only the team with the min value by the column "timestamp", in a straight table in Qlik view.
Do I need to use a calculated dimension? and if so, what is the calculation?
Or, should I use an expression?
below is my sample data.
Unique | orderID | timestamp | team |
1 | 123 | 1/1/2019 | A |
1 | 123 | 20/2/2019 | B |
I need the following in OutPut:
Unique | orderID | timestamp | team |
1 | 123 | 1/1/2019 | A |
Thanks in advance,
Hi Ttal,
You need to first take the minimum value that the date field has.
For that you must do the following:
Table:
LOAD * Inline [
Unique, orderID, timestamp, team
1,123.01 / 01/2019, A
1,123.20 / 02/2019, B];
Temp_Table:
LOAD
orderID,
date (min (timestamp)) as MinDate
Resident Table Group By orderID;
Then in the graph you put as dimensions Unique, timestamp, ordeID and in the expression:
Only ({<timestamp = {'$ (= MinDate)'}>} team)
Tell me if I help you answer.
Result is:
orderID | timestamp | Unique | team |
123 | 01/01/2019 | 1 | A |
Try to use this?
Aggr(FirstSortedValue(team, -timestamp), orderID)