# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

New Contributor II

## Month + 1 IF Statement

Hello All,

I am trying to create a dimension for a 'Month+1'. I created a varable Month1 which is:

Date

(NumMonth+1 &'/01/' & Year, 'MMM')

This shows the correct date but when I add it to my dimension I get 0

=sum(distinct
if(([Company] = 'USA'
AND [Company] = BudgetCompany
AND [Year]= BudgetYear
AND BudgetMonth = \$(Month1)),Budget))/1000

If I add the actual Month Name it works correctly

=sum(distinct
if(([Company] = 'USA'
AND [Company] = BudgetCompany
AND [Year]= BudgetYear
AND BudgetMonth = 'Mar' ,Budget))/1000

2 Replies
Not applicable

## Month + 1 IF Statement

if you want to calculate the current month plus one, ie the next month, you can use the expression

Month (Today ()) +1

= sum (distinct
if (([Company] = 'USA'
AND [Company] = BudgetCompany
AND [Year] = BudgetYear
AND BudgetMonth = Month (Today ()) +1, Budget)) / 1000

I hope you serve.

Employee

## Month + 1 IF Statement

Hello,

Note that QlikView is case sensitive, you your month name must be spelled the same way it is when you do Month(Date).

To get the next month, I'd rather use something like the following:

`=Month(AddMonths(Today(), 1))`

Hope this helps.