Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Karim_Khan
Creator III
Creator III

If statement for Month selection

Hi Team,

    I wanted to use If statement for Month selection  in expression.

Currently My calculation is working as below

=sum({$<FiscalMonth=>}[Net Bookings])

and expression

=AGGR(IF(Rank(sum([Net Bookings]), 4)<=5, [End Customer Global Ultimate Name]),[End Customer Global Ultimate Name])

When I click on Month then values gets associated from Fiscal Month

Month,Fiscal Month

Oct,3

Nov,4

Feb,7

Mar,8

But I want to Apply if condition so that If I will select the Month May then it should pick up the 3

May,3

Jun,4 and so on.

I want this dynamically.

Pls help me out

Regards,

KK

KK
15 Replies
Karim_Khan
Creator III
Creator III
Author

8

KK
sasiparupudi1
Master III
Master III

=num(month(date(addmonths(num(Month(Date)) ,- 2),'MMM')))

Karim_Khan
Creator III
Creator III
Author

Sir value is not getting changed while selecting the month.

Its got fixed to one specific number.

like 11

KK
sasiparupudi1
Master III
Master III

please try

num(month(date(addmonths(date#(Date,'MMM'),-2),'MMM')))

Karim_Khan
Creator III
Creator III
Author

I am trying to put the Fiscal Month but it is not getting calculated

=num(month(date(addmonths(date#(FiscalMonth,'MMM'),-2),'MMM')))

KK
sasiparupudi1
Master III
Master III

hi

sorry I am not following what you want to try here.

the expression num(month(date(addmonths(date#(Date,'MMM'),-2),'MMM')))

should give you fiscalmonth for a selected date in the number format 1,2,3, 4 etc..

if you want to subtract 2 month from the fiscal month then the following should work

=num(month(date(addmonths(date#(FiscalMonth,'MM'),-2),'MMM')))

hth

Sasi