Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to calculate forecast value based on user selection.I am using master calendar where I have month , Year as filter
so if user selects year=15 and month =Jan, then from Feb-15 to May-15 it should come as forecast data.how to calculate that field in expression.
Date | Value |
Oct-14 | 10 |
Nov-14 | 34 |
Dec-14 | 32 |
Jan-15 | 10 |
Feb-15 | 0 |
Mar-15 | 23 |
Apr-15 | 0 |
May-15 | 67 |
Maybe sum({<Date={'>$(=Max(Date))'}>}Value)
If not, please post a small qlikview document that demonstrates the problem.
Is the forecast field available in the database or is this a calculation?
See if it works for you -
same expression as suggested by gwassenaar ,removed zeros from Present Column.
Forecast filed I need to calculate based on value and date
HI Digvijay,
How to apply same forecast logic in below condition:
if(DIVISION='PUMA',sum({<FYEAR=>})Value,sum({<Year=>})Value)
Date filed linking is with master calendar (FYEAR,Year values are from Master calendar)
Try like this - you should verify the result by not changing label of expression, it will show if set expression is failing.
if(DIVISION='PUMA',sum({1<FYEAR=,Date={'>$(=Max(Date))'}>}Value),sum({<Year=>}Value))
Hi Gysbert,
I tried your expression to get previous year value.
=if(DIVISION='PUMA',sum({<FYear={$(=(FYear)-1)}>}Value),sum({<Year={$(=(Year)-1)}>}Value))
but I am getting '0' value in previous year column.
As I posted earlier: If not, please post a small qlikview document that demonstrates the problem.