Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a field dynamically to be used as dimension

Hi,

I need to create a field (~ additional column in the data) based on inputs given by the user in Qlikview and then use this derived field as a dimension.

Ex. My input data has

CompanyScore
110
217
34
420
58
62

Now the user will input a range to classify the scores. Ex. 2 cutoffs as 5 and 15. Based on this, every company will be classified as low, middle or high and I want to then obtain charts such as sales by Score Range, export data of all companies in a particular Score Range. Because these score ranges are dynamic, I cannot define these in the input data. So, is it possible for Qlikview to prepare this new column internally so that I can then use it as a dimension.

CompanyScore

Score Range
(Based on 5 and 15)

(QV to prepare dynamically)

110Middle
217High
34Low
420High
58Middle
62Low

To generalize, I need to create a new dimension in Qlikview which will be defined as an expression (not as simple as the one above).

Any help appreciated.

Shweta

16 Replies
Not applicable
Author

Hi Vikram,

This helps.

So I can provide variable names in the script, allow users to make changes to the values in the dashboard and then ask user to click a button to reload the script which will refresh all objects, right?

Also, is it possible to link the button click to run only that portion of the script that creates these derived variables? I know there is a partial reload option but dont know how to specify the sections to be reloaded.

Regards,

Shweta

Not applicable
Author

Hi

You can use sliders to dictate the the ranges of the Score Range.  Please see the example I have attached.

This allows users to dynamically change the bounds.  You could automate this further by changing the lower limit should the higher limit be dragged lower than it etc.

I hope this answers your question.  Let me know how you get on.


Regards


Steve

Not applicable
Author

Hi Shweta,

You can reload only the specific section of your code by adding the prefix add or replace as per your needs .

Check the modified app

Not applicable
Author

Thanks Vikram.

Trying this out now.

Not applicable
Author

Thanks Steve.

However, I want to use the ScoreRange as dimensions elsewhere - the creation of the variables in the script itself works - refining that further.

Regards,

Shweta

Not applicable
Author

Hi Vikram,

I'm facing a similar situation where in I'm importing data from an excel sheet. I need the calculated fields to be reloaded on partial reload based on the bounds specified but use the data residing in the Qlikview dashboard itself rather then the excel sheet.

In other words, I want the dashboard to be independent of the Excel file (the partial reload should work even if I delete/rename the excel file) from where I'm importing the original data on partial reload.

The files attached here with are little tweaked to get data from the excel file, now if I press the button after renaming the excel file, Qlikview pops-up an error.

Can you guide me, how do I go about it?

Thanks

Pawan

Not applicable
Author

Hi All,

Can someone help me on this please.

I'm not able to find a solution.

Thanks