Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ttal7878
Creator
Creator

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
Creator III
Creator III

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
Anil_Babu_Samineni

Try to use this?

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)