Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

rutpatel
New Contributor II

Re: vMaxMonth variable is not working in Expression.

Hi

      Use '=' in variable Created time .

      Ex: variable Name : vCurrentYear

           =Year(today)

After vCurrentYear variable use : $(vCurrentYear)

renuka_sasikumar
Contributor III

Re: vMaxMonth variable is not working in Expression.

Thanks,

I tried this, but it gives me wrong Count.

Regards,

Renuka S

prat1507
Valued Contributor

Re: vMaxMonth variable is not working in Expression.

Did you check my .qvw file?

Regards

Pratyush

MVP
MVP

Re: vMaxMonth variable is not working in Expression.

Then something else is going on. I suggest that you upload a small sample that illustrates the issue (and which does not need contain any sensitive data). Include the expressions you have tried and specify what result(s) you expect.

To upload a qvf file, click 'Use advanced editor'. You can upload a qvf from there,

rahulpawarb
Valued Contributor II

Re: vMaxMonth variable is not working in Expression.

Hello Renuka,

If you the DateKey as date field then you can make use of below given expression:

=Count({$<MonthNumber = {"=$(=Num(Month(Max(DateKey))))"}>} Data)

Regards!

Rahul

renuka_sasikumar
Contributor III

Re: vMaxMonth variable is not working in Expression.

I don't have QlikView installed.

prat1507
Valued Contributor

Re: vMaxMonth variable is not working in Expression.

Just try and declare a separate variable for =Max([Fiscal Year]) and use it instead of the function, I did the same and it worked out in qlikview.

Regards

Pratyush

Highlighted
renuka_sasikumar
Contributor III

Re: vMaxMonth variable is not working in Expression.

Hi,

I got it, I used it as

vMaxMonth=Max({$<[Fiscal Year]={'$(=Max([Fiscal Year]))'}>}MonthNumber)


Expression :

Count({$<[Fiscal Year]={"$(=Max([Fiscal Year]))"},MonthNumber={$(vMaxMonth)}>}Data)



Regards,

Renuka S

Community Browser