Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
Im working on a qlikview model but a customer asked me to create a what if analysis using a slider object and a table containing x,y,z
any ideas how to go about doing that?
Pls Check attached Doc.
It will Help You.
[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/8182.What-If-analysis.doc:550:0]
Hi ,
Plz give details of what this table is all about, criteria, table content etc.
Happy Thoughts
alright....i got a list of Customers alright. They all got sales, cost, gross profit and gross profit %.
Now i need the create several or if possible just one slider object that depicts certain criteria. e.g
If the sales increase by 10% but the costs increase by 7% what will the outcome be.(How will the GP and GP% change)
The straight table needs to be used to give the outcome by each customer.
let me know if you understand.
I cnt seem to get it right.
Hi Blaze,
First thing to do is to create 2 sliders, one for Sales and one for Cost. Then, assign a variable for both like v_Sales for sales slider and v_Cost for cost slider. Next, assign a Min Value, Max Value and Static Step for your slider. Try to use -10 for Min Value, 30 for Max Value and 1 for Static Step. In this case, your slider would be from -10 (negative ten) to 30 with a step of 1. After doing that, create a straight table with a Customer dimension and expressions for sales, cost, gross profit and gp%.
Now create an expression for your "What-If Sales" the formula would be for example:
sum (SALES) * (1 + v_Sales/100)
And for "What-If Cost:
sum (COST) * (1 + v_Cost/100)
And for Gross Profit (that is Sales less the Cost, right?.. then):
sum (SALES) * (1 + v_Sales/100) - sum (COST) * (1 + v_Cost/100)
so therefore, GP% is:
- change the number format to percentage..sum (SALES) * (1 + v_Sales/100) / sum (COST) * (1 + v_Cost/100)
And TADA!! Now you got your What-If analysis..
Hope that help you solve your problem..
-Lester
well it does work, but now the rest of my data is messed up lol all f my graphs say theres no data etc.
Whats happening?
hmmm.. that's weird.. coz we didn't change any of your data..
i know... but half the data gone even after i delete the what if
actually, the "what-if' has nothing to do with your other graphs or charts.. try to check your script, you might have accidentally changed your script and reloaded it..
- Lester
if i insert the what if analysis then nothing changes okay, but once i move the slider than all my data on every sheet changes and i cnt reset it using clear or anything. my script seems fine i haven't touched it
any Ideas?