Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Show last 12 hours

Hi All,

I want to show the last 12 hours of values on a line chart, my data looks like this:

   

Date/HourFactoryStartTimestampQuantity Produced
26/02/2018_726/02/2018 07:00:0031043
26/02/2018_826/02/2018 08:00:0035930
26/02/2018_926/02/2018 09:00:0041116
26/02/2018_1026/02/2018 10:00:0037452
26/02/2018_1126/02/2018 11:00:0032468
26/02/2018_1226/02/2018 12:00:0024167
26/02/2018_1326/02/2018 13:00:0040477
26/02/2018_1426/02/2018 14:00:0036156
26/02/2018_1526/02/2018 15:00:0040065
26/02/2018_1626/02/2018 16:00:0033116
26/02/2018_1726/02/2018 17:00:0039209
26/02/2018_1826/02/2018 18:00:0046801
26/02/2018_1926/02/2018 19:00:0045720
26/02/2018_2026/02/2018 20:00:0045811
26/02/2018_2126/02/2018 21:00:0033601
26/02/2018_2226/02/2018 22:00:0050304
26/02/2018_2326/02/2018 23:00:0049607
27/02/2018_026/02/2018 00:00:000
27/02/2018_126/02/2018 01:00:0046693
27/02/2018_226/02/2018 02:00:0045030
27/02/2018_326/02/2018 03:00:0046847
27/02/2018_426/02/2018 04:00:0047535
27/02/2018_526/02/2018 05:00:0035166
27/02/2018_626/02/2018 06:00:0037913

The idea is that I show this on a line chart, but always the last 12 hours. Looking at other examples for 24 hours, the set analysis should be something like this, but it doesn't seem to work.

FactoryStartTimestamp = {"$(='>' & TimeStamp(Min(FactoryStartTimestamp), 'DD/MM/YYYY hh:mm:ss') & '<=' & TimeStamp(Max(FactoryStartTimestamp), 'DD/MM/YYYY hh:mm:ss'))"}

Can you advise, please?

Many thanks,

Dayna

5 Replies
Highlighted

May be try this

FactoryStartTimestamp = {"$(='>' & TimeStamp(Max(FactoryStartTimestamp)-0.5, 'DD/MM/YYYY hh:mm:ss') & '<=' & TimeStamp(Max(FactoryStartTimestamp), 'DD/MM/YYYY hh:mm:ss'))"}

Highlighted
Creator
Creator

Hi Sunny,

That only seems to work if I select a single date, whereas when all dates are selected, it's blank?

   

Date/HourFactoryStartTimestampQuantity ProducedRun Rate
0183168000
28/02/2018_2328/02/2018 23:00:00018000
28/02/2018_2228/02/2018 22:00:00018000
28/02/2018_2128/02/2018 21:00:00018000
28/02/2018_2028/02/2018 20:00:00018000
28/02/2018_1928/02/2018 19:00:00018000
28/02/2018_1828/02/2018 18:00:00018000
28/02/2018_1728/02/2018 17:00:00018000
28/02/2018_1628/02/2018 16:00:00018000
28/02/2018_1528/02/2018 15:00:00018000
28/02/2018_1428/02/2018 14:00:00018000
28/02/2018_1328/02/2018 13:00:00018000
28/02/2018_1228/02/2018 12:00:00018000
28/02/2018_1128/02/2018 11:00:00018000
28/02/2018_1028/02/2018 10:00:00018000
28/02/2018_928/02/2018 09:00:00018000
28/02/2018_828/02/2018 08:00:00018000
28/02/2018_728/02/2018 07:00:00018000
27/02/2018_2327/02/2018 23:00:00018000
27/02/2018_2227/02/2018 22:00:00018000
27/02/2018_2127/02/2018 21:00:00018000
27/02/2018_2027/02/2018 20:00:00018000
27/02/2018_1927/02/2018 19:00:00018000
27/02/2018_1827/02/2018 18:00:00018000
27/02/2018_1727/02/2018 17:00:00018000
27/02/2018_1627/02/2018 16:00:00018000
27/02/2018_1527/02/2018 15:00:00018000
27/02/2018_1427/02/2018 14:00:00018000
27/02/2018_1327/02/2018 13:00:00018000

Many thanks,

Dayna

Highlighted

Would you be able to share a sample file to check this out?

Highlighted
Creator
Creator

I thought you'd ask, but not easily unfortunately, I'll carry on and see how I get on. Thanks Sunny!

Highlighted
Luminary
Luminary

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others