# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor III

## Calendar Condition Sceanrio

Hi Everyone,

i have one calendar scenario for Quarter,

Cal:

[Month,MNO,QTR

A,4,AMJ

M,5,AMJ

J,6,AMJ

J,7,JAS

A,8,JAS

S,9,JAS

O,10,OND

N,11,OND

D,12,OND

J,1,JFM

F,2,JFM

M,3,JFM];

Pick(Match(Upper((QTR)),'JAS','OND','JFM','AMJ'),9,12,3,6),

NOTE: JAS stands July, Aug, Sep

OND stands Oct,Nov,Dec

JFM Stands Jan,Feb, Mar

AMJ Stands Apr,May,Jun

Above is my condition i want the output like , let suppose my current month is Feb, it means i m in JFM quarter, it should check always current month and return the value for the same. for feb i.e 2. In march it should be 3 and so on. but apart from current QTR the value should be as defined in Pick Match logic. e.g. for JAS :9, for OND:12, for AMJ, 6,

Any suggestions

4 Replies
Contributor

## Re: Calendar Condition Sceanrio

Hi abhay,

i am not clear what you want exactly, but i think you should

use something like this:

(Ceil(MNO,3)*3) instead of pick for the 3, 6, 9 or 12 value.

also for the other values, you can just use Ceil(MNO,3) for quarter numbers.

it is not specific what you want, if this is not what yo want, please specify it more clearly.

Best regards,

Dick

Contributor III

## Re: Calendar Condition Sceanrio

Hi,

Actualy the data I have is in below format

QTR

JAS

OND

JFM

AMJ

Now I m giving each QTR a number which is like Pick(Match(Upper((QTR)),'JAS','OND','JFM','AMJ'),9,12,3,6)

It check when showing data for any QTR let SAY, JAS it will return the output 9 .

but in the same scenario, for eg JFM , I have assigned the value 3(as per last month of the QTR) , but currently we are sitting in Feb so I want it should return me 2 instead of 3.

Hope I am able to explain .

Contributor

## Re: Calendar Condition Sceanrio

so as i understand correctly, your month numbers do not mach with the numbers returning from your table?

why do you not left join an index on months on your QTR table and make a key linking months and qtr?

it will show as following table.

M, QTR, MQTR, NO

J, JAS, J-JAS, 7

A, JAS, A-JAS, 8

S, JAS, S-JAS, 9

Can you please attach an example .qvw file for better understanding?

Best regards,

Dick

Contributor III

## Re: Calendar Condition Sceanrio

any suggestions ?