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: 
qlik_venu
Creator
Creator

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
Not applicable

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"?

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

jonathandienst
Partner - Champion III
Partner - Champion III

>>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
maxgro
MVP
MVP

maybe this, .qvw in the attachment

1.png

qlik_venu
Creator
Creator
Author

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.

qlik_venu
Creator
Creator
Author

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

qlik_venu
Creator
Creator
Author

I will try this.

qlik_venu
Creator
Creator
Author

I will check this approach.

qlik_venu
Creator
Creator
Author

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