Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Setting a flag when a -ve value is present in an expression

Hi I have the following pivot table:

Capture.PNG

The expressions are the following:

     - Opening Balance: The balance of the item at the start of the week. The current week is what we currently have in stock and the other weeks are the value carried forward from the 'Bal. Carried Forward' expression.

     - MRP Schedules: These are incoming schedules on the item at that particular week 

     - Total: This is the 'Opening Balance' + 'MRP Schedules'. This is done by directly referring to the expressions (ie. [09.   Opening Bal.] + [10.   MRP Schedules])

     - MRP Demand: The demand that we have from the customer at that particular week.

     - Bal. Carried Fwd: This is the 'Total' - 'MRP Demand'. This values is then carried forward to the 'Opening Bal.' of next week.

My requirement is to display an alert if at least we have one 'Bal. Carried Fwd' with a negative value, as the case in yearweek 201609 (marked as red). I was thinking of setting a flag variable ex. vNegBalFlag where the value is set to 'N' if there isn't a 'Bal Carried Forward' with a -ve value or 'Y' otherwise.

However, I am finding this challenging since (unlike say MRP Demand which is brought in from a QVD) the 'Bal. Carried Fwd' field is calculated using a value from the previous week.

Is there a why how I can flag such a -ve Balance?

I also attached a simplified QVW to understand better what I am trying to achieve.

Thanks

Matt

0 Replies