Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
shamitshah
Partner - Creator
Partner - Creator

Set expression

Hi,

I need an expression to blank the forecast for any month where the date is < today. I only require the forecast for the future months.

In the attached example the forecast bar for July 2017 should be blank.

I tried the expression but it is incorrect:-

Sum ({$<Month={'>=$(=date(today()))'}>}Forecast)

Any ideas?

Thanks

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be this for forecast

If(Date(MonthName(Today()),'MMM-YY')=Month,' ',Sum (Forecast))

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

View solution in original post

9 Replies
Anil_Babu_Samineni

May be this for forecast

If(Date(MonthName(Today()),'MMM-YY')=Month,' ',Sum (Forecast))

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
avinashelite

Please find the attachment for the solution

shiveshsingh
Master
Master

hi

how below expression is excluding past values

If(Date(MonthName(Today()),'MMM-YY')=Month

Anil_Babu_Samineni

Haha, May be use sign operations like > and < and >= and <=

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
Kushal_Chawda

try this expression, you need to provide the correct format of month in your set analysis

Sum ({$<Month={">=$(=date(today(),'MMM YYYY'))"}>}Forecast)



shiveshsingh
Master
Master

haha..ok ..fine then

gayatri7
Creator II
Creator II

Try the below expression

Sum ({$<Month={">$(=date(today(),'MMM-YY'))"}>}Forecast)

neha_shirsath
Specialist
Specialist

Hi,

Try the below expression-

Sum ({$<Month={">=$(=date(today(),'MMM-YY'))"}>}Forecast)

Thanks,

neha

neha_shirsath
Specialist
Specialist

Only > not >=

corrected -

Sum ({$<Month={">$(=date(today(),'MMM-YY'))"}>}Forecast)