Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tahreen371
Contributor III
Contributor III

Issues with forecast value display

Hello All,

If we select 1-Dec -2018 to 15-Dec-2018 it displays the actual value for this and remaining Dates from 16-Dec-2018 upto 31-Dec-2018 it displays the Forecasted value.

But when i select for entire month Example:=1-Dec-2018 to 31-Dec-2018 It should display only Actual value and Forecast value as Zero. But the problem is, it displays the forecast value also for this Selection.

Please help and let me know what is wrong with this equation.


If(GetFieldSelections(Date)=max(Date),

(Sum({<FLAG={'AF'},Date={">=$(vBusinessOnTheBooks_ActualFrom_STLY)<=$(vBusinessOnTheBooks_Actual_To_STLY)"}>}ACTUAL_FORECAST_STAY_ROOMS)),

(Sum({<FLAG={'F'},Date={">=$(vBusinessOnTheBooks_Expected_From_STLY)<=$(vBusinessOnTheBooks_MonthEnd1_STLY)"}>}ACTUAL_FORECAST_STAY_ROOMS)
+
(Sum({<FLAG={'AF'},Date={">=$(vBusinessOnTheBooks_ActualFrom_STLY)<=$(vBusinessOnTheBooks_Actual_To_STLY)"}>}ACTUAL_FORECAST_STAY_ROOMS)))

)

Thanks & Regards in advance

4 Replies
agni_gold
Specialist III
Specialist III

provide your sample app, will be easy to understand your variables.
tahreen371
Contributor III
Contributor III
Author

Please anyone help ASAP... need to submit this requirement real quick
Anil_Babu_Samineni

What are the variables do?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tahreen371
Contributor III
Contributor III
Author

Hello, 

These are the four variables i have used for this equation:

1.=If(GetSelectedCount(Date)=0, 
Date(Monthstart(Max({$<PERIOD_FLAG={'ACTUAL'}>}Date))), 
Date(Monthstart(Max(Date))))
 
2.=If(GetSelectedCount(Date)=0, 
Date(Addyears(Max({$<PERIOD_FLAG={'ACTUAL'}>}Date),-1)), 
Date(Addyears(Max(Date),-1)))
 
3.=If(GetSelectedCount(Date)=0, 
Date(Addyears(Max({$<PERIOD_FLAG={'ACTUAL'}>}Date)+1,-1)), 
Date(Addyears(Max(Date)+1,-1)))
 
4.=If(GetSelectedCount(Date)=0, 
Date(Monthend(Addyears(Addmonths(Max({$<PERIOD_FLAG={'ACTUAL'}>}Date),0),-1))), 
Date(Monthend(Addyears(Addmonths(Max(Date),0),-1))))
 
Thanks & Regards in advance