Qlik Community

Qlik Sense Cloud Discussions

Not applicable

Grouping Time data into ranges

Hi there,

I´m looking for some wisdom, I´m new at Qlik and I´m using Qlik Sense.

I´m trying to create a bar chart with intervals of times as Dimension (every half hour, from 10 am to 10 pm), and the count of the number of sales as a Measure.

This way I will be able to know the peak hours.

I have attached the excel sheet.

Thank you very much !

8 Replies
MVP
MVP

Re: Grouping Time data into ranges

Maybe start with something like attached.

Not applicable

Re: Grouping Time data into ranges

Thank you for your answer swuehl

But what I can understood from your example, you are calculating an averge of the data. I think in my case I´m looking for something to create "buckets" that contains the count of the numer of sales. Each "bucket" will be the period of time of every half hour.

Example:

Sale Hours                    Quantity

9:00 am - 9:30 am       I  20 sales

9:31 am - 10:00 am     I  23 sales

10:01 am - 10:30 am   I    5 sales

10:31 am - 11:00 am   I     8 sales

.... and so on.

So the plot of the data will be:

Sales hourse as a dimension and quantity as a measure.

Thank you !

MVP
MVP

Re: Grouping Time data into ranges

No, AFAIR I haven't used an average calculation.

I've rounded / floored the dimensional time values to create distinct half-hour values.

There are a couple of ways you can create your buckets, most involve some rounding function:

Round(), Floor(), Ceil(), Class() etc.

See also

Buckets

Not applicable

Re: Grouping Time data into ranges

Thanks !

Can you help me out with the data that I have uploaded ? haven't manage to do it.

MVP
MVP

Re: Grouping Time data into ranges

You mean like the example I've uploaded 4 days ago?

Not applicable

Re: Grouping Time data into ranges

Yes, like that but with my data, cause on your example the data is generated by script, right?

Thanks

MVP
MVP

Re: Grouping Time data into ranges

Have a look at this sample QVF

Not applicable

Re: Grouping Time data into ranges

Wow, looks amazing !

But... when I try to see the data arrange or the formula for the field you created (TimeOrderBucket) I got this "The execution of the loading data script was completed with errors, one or many data tables are not going to be shown "

So can you help me, pasting the formula of the new field you created "TimeOrderBuckets" so I can reproduce it here?

Thanks a lot !

ps. I know i´m a little bit a pain. but thanks again.

Community Browser