Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

rangesum problem...?

I have the following data:

Year               Month           Sales

201311000
201322000
201333000
201344000
201355000
201366000
201377000
201388000
201399000
20131010000
20131111000
20131212000

I need to select a month and the graph has to show the sales of that month + previous month

example:

if I choose month = 4

The graph should show: 7000

is that range sum or set-analysis?

8 Replies
Not applicable
Author

hi

try this

sum({$<Month={'>=$(=max(Month-1))<=$(=max(Month+1))'}>}Sales)

tresesco
MVP
MVP

You can do it both ways. If you have doubt, prepare a sample app and share. It would be easier to help you there. See how to prepare sample for uploading

Not applicable
Author

hi

sorry some mistakes in my above post

try this

=sum({$<Month={'>=$(=max(Month-1))<=$(=max(Month))'}>}Sales)

Not applicable
Author

hi

see attached file

Sokkorn
Master
Master

Hi,

Use this set analysis: =Sum({<Month = {">=$(=Max(Month)-1)<=$(=Max(Month))"} >} Sales)

Regards,

Sokkorn

er_mohit
Master II
Master II

Try this

Sum({<Month = {'>=$(=Max(Month)-1)<=$(=Max(Month))'} >} Sales)

Not applicable
Author

This one works! but in separate bars in the graph...
I need that the graph show the sum like if I choose month 4...the chart in one bar must show 7000...(4000+3000):

thanks

Not applicable
Author

Good Example, but I need like the green bar in the picture..

how could I do that?

bar.JPG.jpg