Qlik Community

Ask a Question

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
sridhar1
Contributor III
Contributor III

Sum of Sales for Rolling 12 Months

Hi All,

In Qlik Sense

I need Sum of Sales for Rolling 12 Months and also my Year Month needs to show only 12 months. Below is sample data please ignore the values and need to represented in line chart

In Line chart Year Month as X Axis and Sum of Rolling 12 Month Sales in in Y Axis.

I used rangesum(above(sum(sales)),0,12)) but on line Chart X Axis is dsiplaying all Year Month with null values which I dont want to show.

I need to show only 12 Months on X Axis and Sum of Rolling 12 Months. Any suggestions

ICapture.PNG

Year MonthSalesSum of Rolling 12 months
2016095
20161020
20161115
20161210
2017015
20170220
20170315
20170410
2017055
20170620
20170715
20170810
2017095150
20171020150
20171115150
20171210150

201801

5150
20180220150
20180315150
20180410150
2018055150
20180620150
20180715150
20180810150

Thanks

Sridhar

1 Solution

Accepted Solutions
m_perreault
Creator III
Creator III

In the chart properties >> Add Ons >> Data Handling >> Uncheck Include Zero Values

View solution in original post

5 Replies
giovanneb
Creator II
Creator II

Hi try this,

sum({1<OrderDate={">=$(=addmonths(monthend(max(OrderDate))+1,-12)) <=$(=max(OrderDate))"}>}Sales)

sridhar1
Contributor III
Contributor III
Author

Hi Giovanne,

Still All Year Months as displayed in chart with value Zero. I need to display only Last 12 Months on X Axis and metric needs to be Sum of Rolling 12 Months for the corresponding month.

Thanks

Sridhar

m_perreault
Creator III
Creator III

In the chart properties >> Add Ons >> Data Handling >> Uncheck Include Zero Values

View solution in original post

sridhar1
Contributor III
Contributor III
Author

@Mark Perreault. It worked Thanks for your solution.

nesonica
Contributor III
Contributor III

I did it with this one here. Thanks Giovanneb! 🙂