Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

hmjason7
New Contributor

Show last 13 months as a calculated dimension

Hello,

I am trying to show just the last 13 months as a calculated dimension in a Month-Year format for a chart, but it doesn't seem to work.

My MonthYear field is created by the following expression:


Date(MakeDate(Year(MyDateField), Month(MyDateField),1), 'MMM-YY') as MonthYear


Do I create the expression as a calculated dimension or should it be done as a set analysis expression?

If so, what expression should I use?


Cheers,

Jason

1 Solution

Accepted Solutions
Not applicable

Re: Show last 13 months as a calculated dimension

Jason,

I would create the Attribute for Month year in script:

Date(Date#(MyDateFeild,'MMM-YY) ,'MMM-YY') as MonthYear

Then limit data in set analysis expression

Here is qvw to show example

2 Replies
Not applicable

Re: Show last 13 months as a calculated dimension

Jason,

I would create the Attribute for Month year in script:

Date(Date#(MyDateFeild,'MMM-YY) ,'MMM-YY') as MonthYear

Then limit data in set analysis expression

Here is qvw to show example

hmjason7
New Contributor

Re: Show last 13 months as a calculated dimension

Thanks Shawn - works like a charm.

Community Browser