Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rolling 12 Months HELP!

Why is my expression giving me everthing and not just the past 12 months?

Getting really bored of trying to figure it out and all other posts are either going way over my head or i can't work out what i need to adjust to make them fit my report.

Any help will be much appreciated!

Elly

sum

({1<[HEADERS.Posting MonthEnd]={">=$(=addmonths(monthenddate(max([HEADERS.Posting MonthEnd]))+1,-12))

<=$(=max([HEADERS.Posting MonthEnd]))"
}>}

{1<
ITEM_UOM_GP.Brand={'2 DRAINAGE'}>}

{1<
[ITEM_UOM_GP.Reporting UOM Sub Sub Group]={'Accessories'}>}

(
Quantity )/1000)

20 Replies
Not applicable
Author

um no.........i've no idea how to do that from a spreadshet.

Not applicable
Author

ok, i get it.

place this script at the of your script, reload, zip the qvd, attached.

for i = 0 to nooftables()

          LET d = TableName(i);

          if d <> null() then

                    store $(d) into $(d).QVD;

          end if

next

Not applicable
Author

done!

Not applicable
Author

errrr... where?

u need to attach it....

Not applicable
Author

I'm trying but my short fuse is getting the way of my patience today! LOL!

Not applicable
Author

I've had to edit a previous post to add the attachements.

Any reason why i can't add attachments when i initially post something?

Not applicable
Author

here u go... a working one, change the SET as u need to.

MONTH_SEQ is very useful, and flexible and accurate.

Not applicable
Author

Thank you very much for your help, however i am struggling to make it work this end and the only way round it is to send you the file that i am working, however it contains all our sales info and could be quite career limiting is i did send it.

I will consult my boss, to see if he can work it out.

Not applicable
Author

Hi Elly,

If you just want to view the last 12 months you can go into the Presentation tab and enter 12 as the max viewable values.  If you are on version 11 it's in the Dimension Limits tab.  Restrict to show only Last 12 values

I noticed in your example that you are pulling MonYearCalName from an excel spreadsheet which represents the various calendar values.  When that data comes into QV it's a text value and make it difficult to sort accurately.  You may want to consider creating a master calander.  If your interested you can find samples if you do a search on it in the community.  I think you will like it much better in that you will not need to keep the spreadsheet updated.

Not applicable
Author

Morning Steve

I like your thinking....a lot!

However i only have the option for First, Largest and Smallest. Need Last 12 months showing.

Could i do this within the Expression or in the Dimension?

Elly