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: 
Not applicable

IF with current month condition

Hi, guys!

I have a table as follow:


  

MonthsJanFebMarAprMayJun
BG_benchBench USDBench USDBench USDBench USDBench USDBench USD
Engineering000000
Genesys------
International other------
Kyivstar------
Lindorff------
Telecom------
Ukraine other------
0------
Total000000

I need to write th expression with the condition that if  the month is older than the current month I need to calculate with distinct formula.

Like I have an expression now:

If( Month_name<$(vCurMonth),0,Sum({$<Year={2015}>}Sal*Bench_Data))

vCurMonth= monthname(today())

But this formula isn't working properly.

Any ideas?

1 Solution

Accepted Solutions
PrashantSangle

Hi,

In set analysis add Month_name<$(vCurMonth) condition

try like

If( Month_name<$(vCurMonth),0,Sum({$<Month_name={"<$(=monthname(today()))"},Year={2015}>}Sal*Bench_Data))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

1 Reply
PrashantSangle

Hi,

In set analysis add Month_name<$(vCurMonth) condition

try like

If( Month_name<$(vCurMonth),0,Sum({$<Month_name={"<$(=monthname(today()))"},Year={2015}>}Sal*Bench_Data))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂