Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
rido1421
Creator III
Creator III

Set Analysis Based on Month Selections

Hi There

I would like to create an expression that Takes into consideration your current Month selections

I need to Some my forecast data but only from the current month upwards

the expression must take my month selection  into consideration

below expression calculates everything from my current month to my max selected month

it is currently month 5, the below expression sums up everything from month 5 up to my MAXMTH

Sum({<[Fiscal Month]={">=$(vCM)<=$(vMAXMTH)"}>}Forecast)

I need to add this to my actual

Sum(Sales)

+

Sum({<[Fiscal Month]={">=$(vCM)<=$(vMAXMTH)"}>}Forecast)

If I select fiscal month 4 and 6 it must give me the actual of  month 4 + the forecast of month 6

it is currently Month 5 if I select month 4,5,6 and 7 it must give the actual of 4 and the forecast of 5,6,7

Your assistance is appreciated.

2 Replies
AbhijitBansode
Specialist
Specialist

Create one more variable to store minimum value of month, which we will use in actual sales calculation.

vMin=Min(Month)

Now use this variable in calculation of actual sales:

Sum({<[Fiscal Month]={"=$(vMin)"}>}Sales)

rido1421
Creator III
Creator III
Author

Hi Abhijit

The Sales figures are okay because the max of the Sales amount can only be until the current month

so automatically when I add the sales to the forecast it will give me up until the max of the Sales.

I have used the Min variable in the Forecast though...

it seems the only way to do this is with multiple if statements?