Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to group data as ranges on x-axis?

Hi All,

I'm new to QlickView and was wonderiing if anyone can help with a query of mine.. (I have attached an example for reference)

To illustrate I have the following load command:



LOAD *
INLINE [
Revenue, Days,
10, 1
9, 2,
10, 3,
6, 4,
5, 5,
6, 6
];

Now I've generated the a graph with Revenue as a dimension and created an expression that counts the frequency of Revenue to Days.

Is there a way to group the data into ranges? so for example, instead of having 5,6,9,10, I can group it into 5-6 and 9-10 and also sum up the frequency in these ranges?

Any help would be appreciated.

Thanks.



1 Solution

Accepted Solutions
Not applicable
Author

Hi Mob,

This can be done by using "interval matching" functionality of QlikView. Just go through this topic in the reference manual and you will get to know how to implement this functionality.

Best Regards

View solution in original post

5 Replies
Not applicable
Author

Hi Mob,

This can be done by using "interval matching" functionality of QlikView. Just go through this topic in the reference manual and you will get to know how to implement this functionality.

Best Regards

johnw
Champion III
Champion III

You could do it with a calculated dimension. If your ranges should always be the same width, you can use the class() function. For instance, you could replace your dimension with:

class(Revenue,2,'Revenue',1)

If your ranges aren't even, or if you don't like how class() presents the data, you could replace your dimension with something like this:

if(Revenue<=6,dual('0-6',6),if(Revenue<=10,dual('6-10',10),dual('>10',11)))

Not applicable
Author

Thanks guys,

Both suggestions were excellent.

Not applicable
Author

Thanks -- I will try this out.

johnw
Champion III
Champion III


vijaydop wrote:Thanks -- I will try this out.


I'll mention that I wouldn't suggest my solution any more. I dislike calculated dimensions, primarily from a performance perspective. Instead, I'd now suggest using one of those expressions during the load to build a "Revenue Range" field, or something along those lines. That moves any performance hit into the load, where it doesn't affect response time to the users.