Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
CostType | Classification |
---|---|
Salaries | Fixed |
Wages | Fixed |
Rent | Fixed |
Overtime | Variable |
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
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
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.
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.
Please share the sample data with logic and expected output.
Regards,
Kaushik Solanki
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?
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.
Thanks Jonathan. Back to Excel it is...
The file is rather large with lots of confidential data, so I'll upload a shortened version shortly
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