Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Expression Label not displaying correctly

Calendar MonthYear-PeriodFinancial YearFinancial PeriodMonthPeriod-MonthMonth Index
Jan-142014-920149Jan9 - Jan24177
Feb-142014-10201410Feb10 - Feb24178
Mar-142014-11201411Mar11 - Mar24179
Apr-142014-12201412Apr12 - Apr24180
May-142015-120151May1 - May24181
Jun-142015-220152Jun2 - Jun24182
Jul-142015-320153Jul3 - Jul24183
Aug-142015-420154Aug4 - Aug24184
Sep-142015-520155Sep5 - Sep24185
Oct-142015-620156Oct6 - Oct24186
Nov-142015-720157Nov7 - Nov24187
Dec-142015-820158Dec8 - Dec24188

Hi

In the table above , I have Calendar Month linked to our financial year and period. The month index is calculated by taken Financial Year x 12 + Financial Period.  So for eg, Sept 14 , the month index = (2015 x 12) + 5 =  24185.

In my variable overview , i have created a max (MonthIndex) and called it vMaxMI.   In my expression label, if i say =vMaxMI, then the result is 24185.  However,  if i want to display the Calendar Month (ie  Sept 14), I have tried :

if ([Month Index] = vMaxMI, [Calendar Month]) , but this does not work.  I have tried several other variations, but still no success.

Please can you help.

Thanks

kind regards

Nayan

1 Solution

Accepted Solutions
Not applicable

Re: Expression Label not displaying correctly

Hi Konstantins

I have tried it, but i get a blank result.  below is the formula i changed where i added the $ sign.

=if(MonthIndex, $(vMaxMI), [Calendar Month])

kind regards

Nayan


4 Replies
konstantin
Contributor III

Re: Expression Label not displaying correctly

Change vMaxMI to $(vMaxMI) in your expression

senpradip007
Valued Contributor III

Re: Expression Label not displaying correctly

Use $(vMaxMI)

Not applicable

Re: Expression Label not displaying correctly

Hi Konstantins

I have tried it, but i get a blank result.  below is the formula i changed where i added the $ sign.

=if(MonthIndex, $(vMaxMI), [Calendar Month])

kind regards

Nayan


Not applicable

Re: Expression Label not displaying correctly

Hi

An error on my side, in the formula, i mistakenly subsituted a 'comma' for the 'equals to' .  The formula works

Thank you

kind regards

Nayan

Community Browser