Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Scatter charts and ranges

How can I create ranges to select data in my scatter chart?

e.g.

20k+

21-30k

31-40k etc...

Do I need to code this via an inline load? how can I apply this to my scatter graph?

Many thanks

6 Replies
sujeetsingh
Honored Contributor III

Re: Scatter charts and ranges

you need to range this either by function() or by nested if statement as

   if (sales>0 and sales<=20000,'20+K',----

And just do this in the script and use that derived field as Dimension in your UI

Re: Scatter charts and ranges

Make buckets or you can use  calculated dimension

Eg:-

1.

if(Salevalue > 20000, '20k+',

if(Salevalue >=21000 and Salevalue <= 30000,'21-30k',

if(Salevalue >=31000 and Salevalue <= 40000,'31-40k'))) as Bucket

2. you can use it as calculateddimension

if(Salevalue > 20000, '20k+',

if(Salevalue >=21000 and Salevalue <= 30000,'21-30k',

if(Salevalue >=31000 and Salevalue <= 40000,'31-40k')))

Not applicable

Re: Scatter charts and ranges

Thanks for that.

What if I have a specific value of a field for which I want to see ranges for only

e.g. I only want to apply a range to Gross Margin and not Net Marging.

P&L_Line> Gross Margin

P&L_Line > Net Margin

Would I then simply need to do a set analysis expression on my front end to get the ranges I need? Or will the range me added to all the P&L Lines?

Partner
Partner

Re: Re: Scatter charts and ranges

You can go with class function

class( var,10 ) with var = 23 returns '20<=x<30'

class( var,5,'value' ) with var = 23 returns '20<= value <25'

class( var,10,'x',5 ) with var = 23 returns '15<=x<25'


For eg:

Class(GrossMarigin,10) in dimension

Partner
Partner

Re: Scatter charts and ranges

Hello,

There is a very cool function that you can use during the loading process that is called IntervalMatch. Here is an exerpt of the QlikView help (F1), I invite you to look-up the rest of the information for practical examples.

Regards,

Philippe

The IntervalMatch prefix is used to create a table matching discrete numeric values to one or more numeric intervals.

It must be placed before a Load or Select (SQL) statement that loads the intervals. The field containing the discrete data points (Time in the example below) must already have been loaded into QlikView before the statement with the IntervalMatch prefix. The prefix does not by itself read this field from the database table. The prefix transforms the loaded table of intervals to a table that contains an additional column: the discrete numeric data points. It also expands the number of records so that the new table has one record per possible combination of discrete data point and interval.

The intervals may be overlapping and the discrete values will be linked to all matching intervals.

The general syntax is:

IntervalMatch (matchfield) (loadstatement | selectstatement )


matchfield is the field containing the discrete numeric values to be linked to intervals.

loadstatement or selectstatement must result in a two-column table, where the first field contains the lower limit of each interval and the second field contains the upper limit of each interval. The intervals are always closed, i.e. the end points are included in the interval. Non-numeric limits render the interval to be disregarded (undefined).

There is also an extended syntax of IntervalMatch including one or several additional key fields. See IntervalMatch (Extended Syntax).

Kohli
Contributor II

Re: Scatter charts and ranges

Iam also getting same issue. But ranges are not working in Scatter chart. Is any body have solution, Please send chart image.