Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
amber2000
Creator
Creator

How to create interval of time values in a chart


Hello Qlikview wizards,

I have a question about creating a Time interval in a chart.

On my main axe there are multiple time values (hh:mm:ss), I want to narrow the values down to get a cleaner overview.

I want the Nbr of pallets shown per half hour instead of each time value I have in my data..

Does anyone know how to do this please? I've attached a simple example.

Kind regards,

Ambertje

17 Replies
amber2000
Creator
Creator
Author

One small question for the Aisle dimension,  I would like to exclude the "PBL_ ......." values in the chart.

Because  Aisle_Desc is not an expression I can't find the wright function to use.

varunjain
Creator
Creator

Hey...Glad to help

Check if this helps

amber2000
Creator
Creator
Author

Thanks you so much Max.

Rreally good article for advanced users.

I will need to learn what all those functions do and play around with it.

Ambertje

Not applicable

Hi,

I had the same question for a while and the answer I got was little different but cool. 

In that solution you can choose the time interval.

You can try it with this in the script:

TimeInterval:

LOAD * INLINE [

    IntervalSize, IntervalName

    6, 4 parts

    24, Hour

    48, 30 min

];

And make a listbox for TimeInterval.

And then this in the dimension.

=Aggr(

Dual(

(Time(Floor(timeStamp, 1/IntervalSize), 'hh:mm') & ' – ' & Time(Ceil(timeStamp, 1/IntervalSize), 'hh:mm')),

Floor(Frac(timeStamp), 1/IntervalSize)),

timeStamp)

Regards

// Fjalar

demoustier
Creator
Creator

the way i was looking for months !!!!!!!!!

Wonderful !

Thanks !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

amber2000
Creator
Creator
Author

I will try this out and give you feedback

amber2000
Creator
Creator
Author

Hi Fjalar,

Finally I have the time to try out your suggestion.

I'm a little bit confused, a listbox doesn't contain dimensions so I can't add the expression.

I suppose you mean to add the expression in the chart I'm working on.

Am I wright to assume that I have to replace my expression Time(ceil([End_Time], 0.0416666666)) by your expression

=Aggr(

Dual(

(Time(Floor(timeStamp, 1/IntervalSize), 'hh:mm') & ' – ' & Time(Ceil(timeStamp, 1/IntervalSize), 'hh:mm')),

Floor(Frac(timeStamp), 1/IntervalSize)),

timeStamp

Kind regards,

Ambertje

Not applicable

Hi Ambertje!
You probably misunderstood me.  I use a listbox to change the type of timeInterval in a chart.
First, in the load script I do this:

TidsInterval:
LOAD * INLINE [   
IntervalSize, IntervalName  
24, Hour    
48, Half hour    
96, 15 mins ];

Then I make listbox were I choose the IntervalName field.
Then in the chart I use the loooong AGGR function.
Please look at the attached file

I really like to be able to change the time interval so this solution is perfect for me.  Try this out 🙂

Fjalar