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

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
sanjujeeboy
Creator
Creator

Load max hour

Hi 

i have a table like shown below: my requirement is in the chart i should get max date and max hour data ie 11/8/2019 and 3rd hour sales ie 108. how to write expression for this?

CountryDate HourSales
germany11/6/20191100
germany11/6/20192101
germany11/6/20193102
germany11/7/20191103
germany11/7/20192104
germany11/7/20193105
germany11/8/20191106
germany11/8/20192107
germany11/8/20193108
Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try like:

Dim 1: Country

Exp 1: Date(Max(Date))

Exp 2: FirstSortedValue(Hour, -(Date*24+Hour))

Exp 3: FirstSortedValue(Sales, -(Date*24+Hour))

View solution in original post

6 Replies
sanjujeeboy
Creator
Creator
Author

sorry the correct table is

CountryDate HourSales
germany11/6/20191100
germany11/6/20192101
germany11/6/20193102
germany11/6/20194103
germany11/7/20191103
germany11/7/20192104
germany11/7/20193105
germany11/8/20191106
germany11/8/20192107
germany11/8/20193108
tresB
Champion III
Champion III

Try like:

Dim 1: Country

Exp 1: Date(Max(Date))

Exp 2: FirstSortedValue(Hour, -(Date*24+Hour))

Exp 3: FirstSortedValue(Sales, -(Date*24+Hour))

sanjujeeboy
Creator
Creator
Author

 

Hi 

i want the output in straight table as 

CountryDate HourSales
germany11/8/20193108
tresB
Champion III
Champion III

Did you try the solution I proposed?

Capture.PNG

sanjujeeboy
Creator
Creator
Author

Spoiler
 

Hi,

the solution does work. Thanks

can we write a set expression for this? 

tresB
Champion III
Champion III

Set analysis is not something that should be used everywhere. Here you don't need that. 

 

Please close the thread by giving 'like' and/or marking 'correct answer'.