Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to show the last 12 hours of values on a line chart, my data looks like this:
Date/Hour | FactoryStartTimestamp | Quantity Produced |
26/02/2018_7 | 26/02/2018 07:00:00 | 31043 |
26/02/2018_8 | 26/02/2018 08:00:00 | 35930 |
26/02/2018_9 | 26/02/2018 09:00:00 | 41116 |
26/02/2018_10 | 26/02/2018 10:00:00 | 37452 |
26/02/2018_11 | 26/02/2018 11:00:00 | 32468 |
26/02/2018_12 | 26/02/2018 12:00:00 | 24167 |
26/02/2018_13 | 26/02/2018 13:00:00 | 40477 |
26/02/2018_14 | 26/02/2018 14:00:00 | 36156 |
26/02/2018_15 | 26/02/2018 15:00:00 | 40065 |
26/02/2018_16 | 26/02/2018 16:00:00 | 33116 |
26/02/2018_17 | 26/02/2018 17:00:00 | 39209 |
26/02/2018_18 | 26/02/2018 18:00:00 | 46801 |
26/02/2018_19 | 26/02/2018 19:00:00 | 45720 |
26/02/2018_20 | 26/02/2018 20:00:00 | 45811 |
26/02/2018_21 | 26/02/2018 21:00:00 | 33601 |
26/02/2018_22 | 26/02/2018 22:00:00 | 50304 |
26/02/2018_23 | 26/02/2018 23:00:00 | 49607 |
27/02/2018_0 | 26/02/2018 00:00:00 | 0 |
27/02/2018_1 | 26/02/2018 01:00:00 | 46693 |
27/02/2018_2 | 26/02/2018 02:00:00 | 45030 |
27/02/2018_3 | 26/02/2018 03:00:00 | 46847 |
27/02/2018_4 | 26/02/2018 04:00:00 | 47535 |
27/02/2018_5 | 26/02/2018 05:00:00 | 35166 |
27/02/2018_6 | 26/02/2018 06:00:00 | 37913 |
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
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'))"}
Hi Sunny,
That only seems to work if I select a single date, whereas when all dates are selected, it's blank?
Date/Hour | FactoryStartTimestamp | Quantity Produced | Run Rate |
0 | 183168000 | ||
28/02/2018_23 | 28/02/2018 23:00:00 | 0 | 18000 |
28/02/2018_22 | 28/02/2018 22:00:00 | 0 | 18000 |
28/02/2018_21 | 28/02/2018 21:00:00 | 0 | 18000 |
28/02/2018_20 | 28/02/2018 20:00:00 | 0 | 18000 |
28/02/2018_19 | 28/02/2018 19:00:00 | 0 | 18000 |
28/02/2018_18 | 28/02/2018 18:00:00 | 0 | 18000 |
28/02/2018_17 | 28/02/2018 17:00:00 | 0 | 18000 |
28/02/2018_16 | 28/02/2018 16:00:00 | 0 | 18000 |
28/02/2018_15 | 28/02/2018 15:00:00 | 0 | 18000 |
28/02/2018_14 | 28/02/2018 14:00:00 | 0 | 18000 |
28/02/2018_13 | 28/02/2018 13:00:00 | 0 | 18000 |
28/02/2018_12 | 28/02/2018 12:00:00 | 0 | 18000 |
28/02/2018_11 | 28/02/2018 11:00:00 | 0 | 18000 |
28/02/2018_10 | 28/02/2018 10:00:00 | 0 | 18000 |
28/02/2018_9 | 28/02/2018 09:00:00 | 0 | 18000 |
28/02/2018_8 | 28/02/2018 08:00:00 | 0 | 18000 |
28/02/2018_7 | 28/02/2018 07:00:00 | 0 | 18000 |
27/02/2018_23 | 27/02/2018 23:00:00 | 0 | 18000 |
27/02/2018_22 | 27/02/2018 22:00:00 | 0 | 18000 |
27/02/2018_21 | 27/02/2018 21:00:00 | 0 | 18000 |
27/02/2018_20 | 27/02/2018 20:00:00 | 0 | 18000 |
27/02/2018_19 | 27/02/2018 19:00:00 | 0 | 18000 |
27/02/2018_18 | 27/02/2018 18:00:00 | 0 | 18000 |
27/02/2018_17 | 27/02/2018 17:00:00 | 0 | 18000 |
27/02/2018_16 | 27/02/2018 16:00:00 | 0 | 18000 |
27/02/2018_15 | 27/02/2018 15:00:00 | 0 | 18000 |
27/02/2018_14 | 27/02/2018 14:00:00 | 0 | 18000 |
27/02/2018_13 | 27/02/2018 13:00:00 | 0 | 18000 |
Many thanks,
Dayna
Would you be able to share a sample file to check this out?
I thought you'd ask, but not easily unfortunately, I'll carry on and see how I get on. Thanks Sunny!
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