Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
abc_18
Creator II
Creator II

How to calculate forecast data in straight table

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.

  

DateValue
Oct-1410
Nov-1434
Dec-1432
Jan-1510
Feb-150
Mar-1523
Apr-150
May-1567
8 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe sum({<Date={'>$(=Max(Date))'}>}Value)

If not, please post a small qlikview document that demonstrates the problem.


talk is cheap, supply exceeds demand
sunny_talwar

Is the forecast field available in the database or is this a calculation?

Digvijay_Singh

See if it works for you -

Capture.JPG

same expression as suggested by gwassenaar ,removed zeros from Present Column.

abc_18
Creator II
Creator II
Author

Forecast filed I need to calculate based on value and date

abc_18
Creator II
Creator II
Author

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)

Digvijay_Singh

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))


abc_18
Creator II
Creator II
Author

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.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

As I posted earlier: If not, please post a small qlikview document that demonstrates the problem.


talk is cheap, supply exceeds demand