Qlik Community

Qlik Sense App Development

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

renuka_sasikumar
Contributor III

vMaxMonth variable is not working in Expression.

Hi,

When I use Count({$<MonthNumber={'$(vMaxMonth)'}>}Data) where my

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

it's not working.

I know its very simple, but I think I am missing out something.

Can anyone help on this.

I want to show MaxMonth Data in a TextObject.

Regards,

Renuka S

1 Solution

Accepted Solutions
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

17 Replies
prat1507
Valued Contributor

Re: vMaxMonth variable is not working in Expression.

Hi Renuka

Try replacing $(vMaxMonth) with vMaxMonth. I hope it might work.

Regards

Pratyush

renuka_sasikumar
Contributor III

Re: vMaxMonth variable is not working in Expression.

Thanks Pratyush for your prompt reply.

Do you mean to say like this

Count({$<MonthNumber={'(vMaxMonth)'}>}Data_Status)

If so, then also its not working.

Regards,

Renuka S

prat1507
Valued Contributor

Re: vMaxMonth variable is not working in Expression.

Remove the brackets, just keep the variable name.

renuka_sasikumar
Contributor III

Re: vMaxMonth variable is not working in Expression.

No still not working.

Regards,

Renuka S

prat1507
Valued Contributor

Re: vMaxMonth variable is not working in Expression.

Could you please share a sample app.

Regards

Pratyush

renuka_sasikumar
Contributor III

Re: vMaxMonth variable is not working in Expression.

Hi,

Due to some reason I won't be able to share the sample app.

Regards,

Renuka S

Highlighted
prat1507
Valued Contributor

Re: vMaxMonth variable is not working in Expression.

Please find the attached app for your reference.

Regards

Pratyush

MVP
MVP

Re: vMaxMonth variable is not working in Expression.

I think you were very close. Try this:

=Count({$<MonthNumber = {"$(=$(vMaxMonth))"}>} Data)

MVP
MVP

Re: vMaxMonth variable is not working in Expression.

Or redefine the variable with a leading = sign:

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

Then use:

=Count({$<MonthNumber = {$(vMaxMonth)}>} Data)


This assumes that MonthNumber is a simple integer.

Community Browser