Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for
Did you mean:
Contributor III

## Line chart measure dependent on dimension

Hi Qlik Community,

I have created a line chart, with dates on the x-axis and a rangesum for a stock level on the y-axis. The stock is the sum of the stock since "the beginning of time" (2007 ish in my case), however I only want to show on my chart 2015 onwards. When I filter to show only 2015 onwards, the measure recalculates the sum since the new beginning of time (my 2015 filter) and the values change.

Does any one know how to de-couple the measure from the dimension, in a way that will preserve a range sum since the beginning of the data set, when filtering my dimension?

Labels (7)

• ### Stock turnover

16 Replies
Contributor III
Author

Hi Pradosh, Thank you for your contribution. I applied the formula and it shows the data as I would like it, however as I think you've alluded to, I can't select other dates greater than 2015, when using 2015,2016,2017,2018 in the AVG(). A solution would be to make the date a variable? Do you know how to do this? Cheers

Contributor III
Author

So on the sum(in-out) chart we just have the values from those days, where as the rangesum is aggregating my values since all time. The values in the sum(in-out) chart are too small to cause the leaps in the aggr rangesum chart

MVP

Select the first Month u have...

Contributor III
Author

MVP

are u sure that u have no other selection made? other than the date field?

Master II
Try this

use
if( rangesum( above ( sum(<[Transaction Date] > In-Out),0,rowno()) ) <0,
0, rangesum( above ( sum(<[Transaction Date] > In-Out),0,rowno()) )
) * avg(1)

check <Transaction Date> added instead of sum(In-out) inside the above function .

Then multiply the entire expression by avg(1)
Learning never stops.
Contributor III
Author

Hi Omar, correct, no other filters applied

Tags
Community Browser