Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Highlighted
ttal7878
Not applicable

How to show max value row in straight table

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.

UniqueorderID timestampteam
11231/1/2019A
112320/2/2019B

 

I need the following in OutPut:

UniqueorderID timestampteam
11231/1/2019A

 

Thanks in advance,

Labels (1)
2 Replies
tincholiver
Not applicable

Re: How to show max value row in straight table

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:

 

orderIDtimestampUniqueteam
12301/01/20191A
loveisfail
Not applicable

Re: How to show max value row in straight table

Try to use this?

Aggr(FirstSortedValue(team, -timestamp), orderID)

Life is so rich, and we need to respect to the life !!!