Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

expanding time range in chart

Hi Qlikview experts,

I have data records with time interval of 5 minutes. I need to show a stacked line chart with time (e.g. time stamp) as dimension  and number of distinct users as expression. This can be easily shown with a simple dimension and expression but I can only show the chart within limited time range (e.g. less than 24 hours). When I changed the interval to different value number of users is different, which might be additional distinct users added to this longer interval.  As data is quite a lot it is uneasy to verify if this is a correct assumption, but the number does not seem to be in line with normal behavior and observation.

What is the way to show longer period in the chart but still maintain small interval so that the count distinct doesn't add up to unexpected numbers?

Here is the example of the chartCapture.JPG

When interval is changed to show longer period in the chart this is what appears in the chart:

Capture2.JPG

Still new to Qlikview, so any hint to this would be helpful.

1 Solution

Accepted Solutions
MarcoWedel

glad it helped.

please close your thread if your initial question is answered.

Qlik Community Tip: Marking Replies as Correct or Helpful

thanks

regards

Marco

View solution in original post

11 Replies
sunny_talwar

May be like this:

Sum(Aggr(Count(Distinct UserID), TimeStamp))

Anonymous
Not applicable
Author

Hi,

I tried that expression but it seems now it is aggregating all numbers instead of keeping the number the same within  that range. Besides, time range is not extended either unless I change the interval. 

I still cannot show extended time range in the chart without changing the interval, but if I changed the interval to show longer time range the number with longer interval is summed, which I don't expect to see.

The intention here is to show longer time range without changing the 5 minutes time stamp interval.

sunny_talwar

How about this:

Sum(Aggr(Count(Distinct UserID), 5MinuteIntervalFieldHere))

Anonymous
Not applicable
Author

Nothing showing up with that expression.

Attached is the example of the file I am using to test.

sunny_talwar

Can you try this as your dimension:

=Aggr(Dual(

( Time((Ceil([Time Stamp],1/IntervalSize)),'hh:mm')),

Ceil(Frac([Time Stamp]),1/IntervalSize)), [Time Stamp])



Anonymous
Not applicable
Author

Hi,

Actually I have already used this similar expression, and tried with both  Ceil and Foor .

=Aggr(Dual(

( Time((Ceil([Time Stamp],1/IntervalSize)),'hh:mm')),

Ceil(Frac([Time Stamp]),1/IntervalSize)), [Time Stamp])

It is OK to change the interval, but when I change the interval my chart us different. My intention is actually to keep the interval size at 5 min but would like to show longer period (e.g. 3 days or one week) instead of just merely a few hours on the x dimension.  I think the above expression simply allows us to change the interval and round up the value to the nearest interval value)

I'd like to show the first chart above and keep the 5 in interval but showing longer range without using time slider on the X axis. 

MarcoWedel

Hi,

one solution could be to use the "show all bars" option of the presentation tab.

(It will be available only after switching to bar chart type, but you can switch back to line chart after applying this setting.)

QlikCommunity_Thread_221234_Pic6.JPG

QlikCommunity_Thread_221234_Pic2.JPG

QlikCommunity_Thread_221234_Pic3.JPG

Another solution could be to use a continuous dimension axis.

You cannot use this option with your current calculated dimension as it delivers no numerical values, just text.

Changing your dimension to

=Timestamp((Ceil([Time Stamp],1/IntervalSize)),'DD-MMM-hh:mm')


however will also deliver numerical values to use with continuous dimension axis:


QlikCommunity_Thread_221234_Pic7.JPG

QlikCommunity_Thread_221234_Pic5.JPG

hope this helps

regards

Marco

Anonymous
Not applicable
Author

HI Marco,

Many Thanks for the tips. This works.

I learn something today.

MarcoWedel

glad it helped.

please close your thread if your initial question is answered.

Qlik Community Tip: Marking Replies as Correct or Helpful

thanks

regards

Marco