
Not applicable
2015-04-03
03:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
2,166 Views
1 Solution
Accepted Solutions

MVP
2015-04-03
03:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 🙂
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 🙂
1,674 Views
1 Reply

MVP
2015-04-03
03:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 🙂
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 🙂
1,675 Views
