Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
UserID2626
Creator III
Creator III

Set expression of Hour for the max date Qlik sense

My requirement is to show Hour wise for one day and Day wise for month.

Dimension formulas are kept alternate

aggr(Only({<dt=,dt={">=$(=Monthstart(Max(dt)))<=$(=Monthend(Max(dt)))"}>}dt),dt)

aggr(Only({<dt=,dt={"$(=Max(dt))"}>}hr),hr)  //not working for max date, showing result for all the date in hour wise

Measure

Sum({<dt=>}revenue)

Need to keep Date & hour as alternate dimension in same chart

Help me with set expression to get hr wise result single date.

 

 

Labels (3)
1 Solution

Accepted Solutions
Prink
Contributor III
Contributor III

Dear User,

Use condition like below to display hour for only max one date:

aggr(only({<$(hour_max_date)>}[business hour]),[business date],[business hour])

$(hour_max_date) -> create this variable to get max date.

 

 

View solution in original post

3 Replies
tresesco
MVP
MVP

What if you format the date value, like:

aggr(Only({<dt=,dt={"$(=Date(Max(dt)), 'date format of dt field')"}>}hr),hr) 

UserID2626
Creator III
Creator III
Author

Its not working

Aggr(only({<dt=,dt={"$(=(max(dt))"}>}hr),dt)

Giving above condition dispays result if i select any particular hr.

I have to show all 24 hrs ..help me with set expression.

 

Prink
Contributor III
Contributor III

Dear User,

Use condition like below to display hour for only max one date:

aggr(only({<$(hour_max_date)>}[business hour]),[business date],[business hour])

$(hour_max_date) -> create this variable to get max date.