Qlik Community

Ask a Question

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

inventory turns

Hi all,

          I am kind of stuck with a requirement. Can anybody help me with this please

i have my inventory and sales across the year by week. i need to calculate the inventory turns. my calculations needs to be

((current week inventory+last week inventory)/2)/sales for current week. i have tried the previous(inventory) function but did not help. is there any other way that i can achieve this?. i was able to calculate the turns in a pivot table with this expression

RangeAvg( Before( Sum ([inventory]),0,2 ))/SUM([sales]). But not able to project the same in a bar or line chart. i know that before function doesnt work with charts other than pivot chart. So can anybody help me with this?

Thanks

1 Reply
NareshGuntur
Partner
Partner

Before may not work as it works on the front end. This goes wrong if a selection is applied.

I would suggest you create a new table with the averages calculated and then link it to the main table based on the week.

Cheers,

Naresh