# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for
Did you mean:
Highlighted
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.

Labels (8)

• ### qliksense developers

1 Solution

Accepted Solutions
Highlighted
Contributor III

## Re: Set expression of Hour for the max date Qlik sense

Dear User,

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

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

3 Replies
Highlighted
MVP

## Re: Set expression of Hour for the max date Qlik sense

What if you format the date value, like:

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

Highlighted
Creator II

## Re: Set expression of Hour for the max date Qlik sense

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

## Re: Set expression of Hour for the max date Qlik sense

Dear User,

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