Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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 (2)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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? 

tresesco
MVP
MVP

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'.