Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Creating Range calcuation in dimensions

Hi,

I have a requirement to create Ranges based on measures and then use them as dimension to display other metrics.

Here is the table 1 I have ( Added Below), the last column Calculated Column - Item Range I get from the previous column Sales and has to be calculated in Qlikview.

Table 1

   

Calculated Column
Sales Packs within ItemItem Range
Item 110020Item Range 1 ( 0 to 200 Sales)
Item 220025Item Range 1 ( 0 to 200 Sales)
Item 330030Item Range 2 ( 200 to 400 Sales)
Item 440010Item Range 2 ( 200 to 400 Sales)
Item 535023Item Range 2 ( 200 to 400 Sales)
Item 660032

Item Range 3 ( 400 to 600 Sales)

The Requirement is to create a Bar chart with the below measures. Can you please suggest me how to achieve this.

Currently I am creating this range in the Load script and using that as a dimension in my chart. But this would remove any dynamic filters which can be used on this dimension. So I am looking for a better approach. Thanks !!

Chart   

Chart
Item RangeCount of packs in the RangeSum of Sales
Item Range 1 ( 0 to 200 Sales)45300
Item Range 2 ( 200 to 400 Sales)631050

Item Range 3 ( 400 to 600 Sales)

32600
9 Replies
Highlighted
Not applicable

Re: Creating Range calcuation in dimensions

how you are creaing Item range in script? if answer is using interval match() function, then you have done it correctly.
what do you mean by "Dynamic filters"?

Highlighted
Partner
Partner

Re: Creating Range calcuation in dimensions

Highlighted

Re: Creating Range calcuation in dimensions

>>But this would remove any dynamic filters which can be used on this dimension.

Creating a range field in script should not affect your ability to filter on this or other dimensions unless you are aggregating the records in the load. But perhaps I am not understanding your problem correctly. Do you mean you want to apply the ranges dynamically?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
MVP
MVP

Re: Creating Range calcuation in dimensions

maybe this, .qvw in the attachment

1.png

Highlighted
Contributor III
Contributor III

Re: Creating Range calcuation in dimensions

I am just using a normal if condition in the script. 

I was referring to the normal selections being made in qlikview as the dynamic filters. Once I define my range based on the Sum(Sales), I will not be able to apply a filter on the sales measure used to define the range. For eg. I cant define a Range based on Sals only for US region. Since the group is already defined, I can only show the range at the global level.

Highlighted
Contributor III
Contributor III

Re: Creating Range calcuation in dimensions

Yes I am aggregating the measure in the Load. Sum(Sales) is an aggregated expression.

Highlighted
Contributor III
Contributor III

Re: Creating Range calcuation in dimensions

I will try this.

Highlighted
Contributor III
Contributor III

Re: Creating Range calcuation in dimensions

I will check this approach.

Highlighted
Contributor III
Contributor III

Re: Creating Range calcuation in dimensions

Hi,

The Class function works fine, but rom my clients requirement it appears that the class intervals are not the same. Just saw this.

Any suggestions,

Venu