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
gautik92
Specialist III
Specialist III

try loading inline table

Anonymous
Not applicable

use mapping inline table together with applymap

TEST:

mapping load * Inline [

Month, Seq

May, 3

June, 4

...

];

in table

load

abc,

applymap('TEST',yourmonth) as SeqNr

def,

resident ...

sasiparupudi1
Master III
Master III

use the expression

FiscalMonth={"$(=date(addmonths(date#(Month,'MMM'),-2),'MMM'))"}

ex:date(addmonths(date#('May','MMM'),-2),'MMM')

qlikviewwizard
Master II
Master II

Can you please attach the sample file. It would be easier to provide the solution. Thank you.

Karim_Khan
Creator III
Creator III
Author

But Sir will it work for dynamic month

KK
sasiparupudi1
Master III
Master III

yes it should work if your fiscal month is always 2 months behind the actual month value

Karim_Khan
Creator III
Creator III
Author

it is working.But If  I wanted to apply this login in Fiscal Month then.

It has the Numeric Value

1,2,3,4,....12.

Its code is as follows

Mod(Month(Date) - $(vFiscalYearStartMonth), 12)+1

I wanted to apply the above logic to this

KK
Anonymous
Not applicable

Hi Karim,


Try :


Pick(Match(MONTH,'May','Jun','Jul',........), 3,4,5,........)

Regards

Neetha

sasiparupudi1
Master III
Master III

what are the values in $(vFiscalYearStartMonth) ?