Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

Cumulative data when applying filters

Hi,

I have a bar chart where I show the sales data for a given country in a cumulative way for the last 12 months. Moreover I have a list box where I can see the months.

The issue I'm having is that when I select a month from the period list box, the bar chart shows the data for the selected month but not taking into account all cumulative sales but just the sales for that month

Taking the example attached, for UK in month 201812 I have a total of 60 sales cummulative. However, when selecting 201812 period from the list box, then the bar chart shows only one bar (the one related to 201812) with 8 sales, and actually what I need is that when I select the month 201812 from the list box, I'd like to get one single bar chart BUT showing 60 sales (rather than 8 sales)

I hope someone can help me

Thanks,

Dani

1 Solution

Accepted Solutions
sunny_talwar

Try this expression with no accumulation selected

=RangeSum(Above(Sum({<Period>}Sales), 0, RowNo())) * Avg(1)

View solution in original post

5 Replies
sunny_talwar

Try this expression with no accumulation selected

=RangeSum(Above(Sum({<Period>}Sales), 0, RowNo())) * Avg(1)

View solution in original post

jyothish8807
Master II
Master II

Hi Dani,

Try this:

Best Regards,
KC
jyothish8807
Master II
Master II

Hi Sunny,

Can you please let me know the how Avg(1) allows to show the selected period ?

Thanks in advance!

Best Regards,
KC
sunny_talwar

Avg(1) = 0 for non selected periods and Avg(1) = 1 for selected period. Something multiplied with 0 leads to 0.

jyothish8807
Master II
Master II

Got it. Thanks a lot 🙂

Best Regards,
KC