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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Forecast not showing with certain selections

Hi,

I have a field [Enrollment Count] whose value is populated on daily basis.

Now in the middle of the month, I have to make a forecast for the remaining days of the month for which

I am using this expression :

 

if(not sum([Enrollment Count]),linest_m(total aggr(if(sum([Enrollment Count]),sum([Enrollment Count])), Date), Date)* Date  +linest_b(total aggr(if(sum([Enrollment Count]),sum([Enrollment Count])),Date), Date))


This gives me a projection based on regression.

However, I also have a field state. If I select a particular state, then the projected values do not come on the chart.

Any particular reason for this?

Regards,

Rajiv

3 Replies
Not applicable
Author

if(not sum([Enrollment Count]),

linest_m(total aggr(if(sum([Enrollment Count]),sum([Enrollment Count])), Date), Date)* Date

+linest_b(total aggr(if(sum([Enrollment Count]),sum([Enrollment Count])),Date), Date))


The expression that I am using.

Not applicable
Author

If may be due to the forecast dates not being associated with any states. Once you select something only the associated data will be displayed - the "associative" experience. This is the default functionality of qlikview.

You can try concatenating the forecast data to your fact table for each state. This will allow you to select a state and still have the forecast dates be associated. If done correctly, your forecast will still display.

Not applicable
Author

For example, you could do this

UniqueStates:

LOAD DISTINCT

     STATES //Change to your actual state field name

RESIDENT #FactTabelName; //#FactTableName should be your table name

For i = 15 to 30 //From day 15 to day 30 - assuming 30 days

     CONCATENATE (#FactTabelName) //#FactTableName should be your table name

     LOAD

          STATES //Change to your actual state field name

          ,MakeDate(2012,3,$(i)) as Date //creates date for each remaining day

     RESIDENT UniqueStates;

Next