Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manpri7078
Creator
Creator

Rolling Quarters Data

Hi All,

I am attaching both sample excel file and sample qlikview document.

I want to make a rolling bar chart for quarterly data. The last bar will represent last possible quarter as per the data and previous bars will represent last n quarters depending upon the requirements of n.

My year start with April every year. So Q1 means Apr, May and Jun.

Please guide me in making the expression.

For Rolling Months data I am using following expression at present :

[Mon-Y]={">$(=Num(Addmonths(Max([Mon-Y]),-5))) <=$(=Max([Mon-Y]))"} - for 5 rolling periods

and dimension I am using is Date([Mon-Y],'MMM-YY')


Now I want to make similar expression for rolling quarters for dimension representing quarters.

Regards,

Manish Prasad

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Manish,

see Attachment,

Regards,

Antonio

View solution in original post

14 Replies
balar025
Creator III
Creator III

Hi Manish,

Can you please share your expected output ?

-Ravi Balar

manpri7078
Creator
Creator
Author

Dear Ravi,

I have attached the desirable bar chart already. But it is showing all the quarters data as per sample excel file. I want to define a variable for example 2. And the bar chart will show last two quarters data. if I define it 3 it shows for 3 quarters and so on.

I hope I have clarified your query.

Regards

Manish Prasad

balar025
Creator III
Creator III

Hi Manish,

As i understand, you requirement to show, conditional Quarter

for example if i select Apr-17 which falling Q1-17.

So, Q1-17, Q4-16,Q3-16 if my variable is define as 2.

Q1-17, Q4-16,Q3-16, Q2-16 if my variable is define as 3. So on...


- Ravi Balar

antoniotiman
Master III
Master III

Hi Manish,

see Attachment,

Regards,

Antonio

manpri7078
Creator
Creator
Author

Hi Antonio,

Thanks for your guidance. It now fulfills my purpose. It should be marked as correct.

However I am now curious to know more. Can this type of expression be made for Half Years as well. For example HY1 means Q1 + Q2 and HY2 means Q3 + Q4. And also like wise Year ones.

If so can you help me again.

Regards,

Manish Prasad

antoniotiman
Master III
Master III

See Attachment.

manpri7078
Creator
Creator
Author

Hi Antonio,

I mean to know about rolling HYs just as for rolling Quarters for which your guidance worked perfectly for me.

For example If I select 2, then the bar chart should show last 2 HYs data and so on just as you have done for Quarters data.

I am attaching sample excel file again with some modifications to incorporate HY data.

Please guide me accordingly.

antoniotiman
Master III
Master III

See Attachment.

manpri7078
Creator
Creator
Author

Hi Antonio,


As per my sample data, my outcome should be the following If I select 3 from the slider object :

1. Since Q1 data for year 2018 is available only up to May 2017 hence my last bar to show same value as 251279 (Q1-18).

2. Now my second last bar to show value for H2-17 which is 755279

3.And my third last bar to show value for H1-17 which is 719949.

This is my expectation when I am selecting 3 from the slider object.

Hope I am more clear now of my expectations

Regards

Manish Prasad