Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pnn44794
Partner - Specialist
Partner - Specialist

Rolling 13 Month Stacked Bar Chart View

Hello:

I realize there's a few posts regarding rolling views and I've tried some of the sample code (using rangesum and couple of other examples), but none quite work for me, but that could be my fault as I'm still new to Qlikview.

What I'm looking to do is create a stacked bar chart that would be comprised of a Business, i.e. Business1, Business2, etc. on top of each other in the chart, showing 13 months of billing information.  I pull the data directly from a database into Qlikview.

The fields I have are:
Business1 through to Business10 - Easy enough to get this part

CHARGE_AMOUNT - A dollar based figure I would need to sum for each month

CHARGE_MONTH in the form YYYYMM, i.e. 201609 - For the 13 month rolling view, if ran today, I'd like to see 201509 through 201609.  Next month I would want to see 201510 through 201610.  Etc.

I'm essentially stuck on creating the formula / expression to do this.  Any help would be greatly appreciated.  Thanks in advance.

1 Solution

Accepted Solutions
harishkumarg
Creator III
Creator III

HI

Please find the attached ap.

Set analysis will help you to display the last 13 moths data.

Please try to build your expression similar to the one in the attached app.

Regards

Harish

View solution in original post

13 Replies
sunny_talwar

May be it would be easier if you can provide some sample data with the output you expect to see from it.

ramasaisaksoft

Hi Newman,

I hope you wan the sum  value of all 13 months for business wise

so x- axis is  business 0, business 1...etc

Y -axis sum value ($ 1900,$2000...etc ) of 13 months

and u need to write if (month(CHARGE_MONTH )='Sep',sum(CHARGE_AMOUNT )  


you  will get month wise amount.

if this solution is not suitable for you kindly post your sample data and expected output.So that our folks will help to you ASAP.

pnn44794
Partner - Specialist
Partner - Specialist
Author

Hi Rama.  Please see my reply to Sunny T.  I hope that gives you a better idea of what I'm looking for / trying to do.

pnn44794
Partner - Specialist
Partner - Specialist
Author

Test sending.

Perry Newman

pnn44794
Partner - Specialist
Partner - Specialist
Author

Hello Sunny:

Do you need anymore information?

harishkumarg
Creator III
Creator III

HI

Please find the attached ap.

Set analysis will help you to display the last 13 moths data.

Please try to build your expression similar to the one in the attached app.

Regards

Harish

sunny_talwar

All I need is few rows of data (dummy and made up data can work) and the output you expect to see from that data. I am sure the questions might not be too difficult to understand, but unfortunately I am unable to understand the requirement.

Best,

Sunny

pnn44794
Partner - Specialist
Partner - Specialist
Author

Hello Harish:

So the expression gives me, right now, 201509 through 201609, which is what I want and it calculates the charge amount correctly. I’d like to see what happens once we go into October before marking this as the correct answer. A big thank you in advance for your help. I appreciate it.

Perry

pnn44794
Partner - Specialist
Partner - Specialist
Author

Hello Sunny:

Harish may have given me the correct answer, wish I appreciate.  I'm waiting to see what happens when we roll over to October.

At the same time, I appreciate you responding as well.  Thank you.

Perry