Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
gitguto
Contributor III
Contributor III

Lock filter from measure result but not from visualization

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

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.

 

 

 

 

0 Replies