Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for
Did you mean:
Not applicable

IF with current month condition

Hi, guys!

I have a table as follow:

 Months Jan Feb Mar Apr May Jun BG_bench Bench USD Bench USD Bench USD Bench USD Bench USD Bench USD Engineering 0 0 0 0 0 0 Genesys - - - - - - International other - - - - - - Kyivstar - - - - - - Lindorff - - - - - - Telecom - - - - - - Ukraine other - - - - - - 0 - - - - - - Total 0 0 0 0 0 0

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

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 🙂

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 🙂
Community Browser