Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

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.

 

 

1 Solution

Accepted Solutions
Highlighted
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
Highlighted
MVP
MVP

What if you format the date value, like:

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

Creator II
Creator II

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.

 

Highlighted
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