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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
rido1421
Creator III
Creator III

Set Analysis

Hi There

Please could you assist me

I am trying to Create an expression to sum my forecasts if the month selection is greater than or equal to the current month

Sum({<[Fiscal Month]={">=$(vCM)"}>}Forecast) --- This will give you the sum of all the months greater than or equal to the current month

I only want to sum the selected month if the month or months selected is greater than the current month

Thanks

8 Replies
rido1421
Creator III
Creator III
Author

vCM==(Mod((Month(Date(Date#((Today()),'YYYY/MM/DD'),'DD/MM/YYYY')))-$(vFM), 12)+1 )

vFM=10

Anonymous
Not applicable

Hi Rido,

Try:

vCM = Month(Today());

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

Regards

Neetha

rido1421
Creator III
Creator III
Author

Hi Neetha

That doesnt seem to work...

rido1421
Creator III
Creator III
Author

I also have to keep my vCM as my Fiscal month....

Anonymous
Not applicable

Hi Rido,

When you select a month what is the output,

if less than month selected/greater than month selected.

rido1421
Creator III
Creator III
Author

Hi Neetha

It is giving a blank result .

This gives a result.. Sum({<[Fiscal Month]={">=$(vCM)<=$(vMAXMTH)"}>}Forecast)

it should do the same as you posted?

when selecting individual months eitherway greater or lower than current the figures are incorrect as well as when selecting multiple months

The reason I need to do this is because I want to sum the actual sales amounts prior to the current month

and add it to the Forecast figures of the future months , so that when selecting multiple months past currrent and future month you will get correct figures.

Anonymous
Not applicable

if you select greater than today month you are getting empty results,am i right?

rido1421
Creator III
Creator III
Author

Hi Neetha

No it doesnt give empty results... but the amount is not correct...