Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello --
I need to generate a running total. The total will remove values from a static qty. When the running total dips below a certain level, it needs to add a predefined number to the running total to keep it from going negative.
The goal of the running total is to stay above a certain #.
How can this be achieved in Qlik?
Example:
| Running Total | Description |
|---|---|
| 6000 | Starting Qty |
| 5000 | |
| 4000 | |
| 3000 | |
| 2000 | |
| 1000 | Minimum reached - automatically add 1000 |
| 2000 | |
| 1700 | |
| 1300 | |
| 1000 | Minimum reached - automatically add 1000 |
| 2000 | |
| 1900 | |
| 1800 |
Hi,
Can you try the below attached
Hi Settu --
Thank you, this seems to be working as expected now.
One other question that is somewhat related. Do you think it would be possible to use a time variable as well to determine when the qty should be added? For example, the data table reduces and adds the qty when it reaches below a value. But what if I only want to add that value if it was X # of days after the last time it reached that value.
Example:

You can try this...
Create a Variable, and use that variable in your expression like Mod(RowNo(),vPassedDays)
PFA for reference.