Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jacqueshol
Creator
Creator

Changing of dimension values

Hi all,

I have probably been abusing the good support of the Qlik community the past few days, but have been assisted wonderfully throughout.  So, after endlessly searching for an answer, I thought I'd try the community again for some answers.  Once again, I'm pretty sure that a simple solution exists, but as a newbie, it escapes me...

I have a number of CostTypes (>100), e.g. Salaries, Wages, Rent, Overtime, etc.  Each of these are classified as either a FIXED or VARIABLE cost.  I have set these in my input datasheet (Excel). E.g.

CostTypeClassification
SalariesFixed
WagesFixed
RentFixed
OvertimeVariable

However, there has been some debate among ourselves about the classification of some of these costs and I want to be able to change these classifications in QlikView, rather than in Excel and reloading the data every time.  Is this possible?  E.g. Wages has initially been categorised as a FIXED cost, but if we decide that it should be a VARIABLE cost, I'd like to make this change in the model so that it subsequently updates all my calculations based on FIXED and VARIABLE.  Am I making sense?

I've tried to use InputField, but my lack of knowledge has prevented me of coming up with a workable solution.

Any assistance would be greatly appreciated.

Take care,

Jacques

11 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

There are two things to this.

If you have done any calculation based on the classification in Script then the calculation will not change if you change the classification from InputField.

second if you do the logic calculation on front end, it may happen that your application start giving performance issue, because everytime value will change, all expressions will have to be recalculated and that too on the fly.

So what I would suggest is you move your calculations to script and then you use the mapping functions to change the current classifications, so that your calculation will change depending on the mapped value of the field.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

you should go with excel and define calculation in script depending on classification in excel file. whenever you changed something in excel, you calculation automatically will change depending on classification value.

jacqueshol
Creator
Creator
Author

Hi, thanks to all for answers, but I am really not understanding. Firstly, there are no calculations based on FIXED or VARIABLE in script. We are all around a boardroom table, interrogating the costs.  I have a basic table chart summing the FIXED and VARIABLE costs. I simply want to be able to change a CostType from, say, FIXED to VARIABLE and then the sum of these need to recalculate.  From what I gather from the responses a simple solution is not forthcoming. 

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Please share the sample data with logic and expected output.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable

Maybe you could create a mapping table in your data model to map each cost type to a classification then all you would need to change is the classifications in the mapping table and reload. Not sure if this meets your requirements. Maybe you could share some more details about your requirements?

jonathandienst
Partner - Champion III
Partner - Champion III

There is no simple solution to do what you want. It may be possible to cobble something together using variables, bookmarks and possibly alternate states, but it is not that simple.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jacqueshol
Creator
Creator
Author

Thanks Jonathan.  Back to Excel it is...

jacqueshol
Creator
Creator
Author

The file is rather large with lots of confidential data, so I'll upload a shortened version shortly

Mark_Little
Luminary
Luminary

Hi,

Like people have suggested it is probably as easy to do it in excel, unless there is set logic to changing this. if so you can do in script dynamically

something like

IF(Field > 100, 'Fixed', Classification) as Classification

otherwise if you are just choosing some to be changed then the values need to be kept and updated some where.

Mark