Hello community,
I have a measure "Inventory" that is calculated through an accumulative sum expression:
RangeSum(Above(Total Sum({<[Year],[Month]>}Inventory),0,RowNo(TOTAL)))
Notice that I have to exclude the possibility to filter the dimensions Year and Month as it would affect the calculated result. This is because I have inventory data since the beginning of my operation, and the current inventory is the sum of all entries (negative entries indicating outbound movement).
My problem is, I need to display in a table the inventory month by month. Using this expression as the measure, I get the correct values for each month, but the user can't filter the year and/or month to narrow their analysis without affecting the value shown.
![gitguto_0-1628649349022.png gitguto_0-1628649349022.png](https://community.qlik.com/t5/image/serverpage/image-id/59954iAC5EA2255D89A71B/image-size/large?v=v2&px=999)
Notice that even though the year dimension is filtered to only show 2021, I got entries from all the historical data.
Does anyone know a workaround to lock the filter from the measure result, but not from the visualization?
P.S. If I try RangeSum(Above(Total Sum(Inventory),0,RowNo(TOTAL))), the result will be wrong as it would only calculate the cumulative sum from the months that are filtered.