Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

What If Scenario

Hello Everyone..

I haven't got any data to test this on yet, so unfortunately I cannot upload an example. I am planning on creating a what if scenario, but rather than if the price is higher, etc, it's based on 'What If we don't do something', so if we planned to NOT create a work order, what effect would this have on our stock levels, etc..

Say we have a field called stock, and a field for Work Order called WO_ID, and the WO_ID has a field related to how much stock it would used called WO_Stock. Could you advise as to how best to achieve this scenario?

Many thanks for your help!

Kind Regards,
Dayna

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

It's actually very simple - you declare the field to be an INPUTFIELD and then load it as a part of your usual load. For example:


INPUTFIELD OrderIncluded;

LOAD DISTINCT
OrderNumber,
1 as OrderIncluded
RESIDENT
Orders
;
[\code]</body>

View solution in original post

7 Replies
Not applicable

I think you need to give a more specific example for with the information given why don't you just don't subtract the stock used by the work order from the total stock? Or if it is implicitely done in the data already adding it?

/Michael

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I'd suggest adding an INPUTFIELD "Include/Exclude" and associate it with the WO.The field (like a "flag" field" would get 1 for included orders and 0 for excluded orders. Let the users enter 0 or 1 for each Order.

Then, in all calculations, you can multiply certain values by the flag, or use it in Set Analysis, to only included those orders that are marked with 1.

Dayna
Creator II
Creator II
Author

Hello,

Many thanks for your reply! I'm quite a novice when it comes to InputFields, do you have an example where I can associate it with a field?

Kind Regards,
Dayna

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

It's actually very simple - you declare the field to be an INPUTFIELD and then load it as a part of your usual load. For example:


INPUTFIELD OrderIncluded;

LOAD DISTINCT
OrderNumber,
1 as OrderIncluded
RESIDENT
Orders
;
[\code]</body>
deepakk
Partner - Specialist III
Partner - Specialist III

hi Dayna,

The attach application is the combination of above discussion. Click on the whatifQty expression to change the value.

I hope this helps.

Dayna
Creator II
Creator II
Author

Hello Both,

Many thanks for your help! I'm sure that'll do the job!!

On a different note Deepak, how did you create the custom style on your Pivot Table? I was trying to do that the other day! 🙂

Many thanks,
Dayna

deepakk
Partner - Specialist III
Partner - Specialist III

hi Dayna,

Press Ctrl +G , it will enable design grid or in Design tab there is a design Grid button, click on it.

Right click on the pivot table --> Custom Format Cell. Then click on any rwo to change the colors.