Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

candiceb
New Contributor

Calculating Average Weeks and counting backwards based on Variable

Hi all ,

I have a table which has sales and Inventory.

I need to show the total sales for a certain time frame (week/year) and inventory as well, but also an average inventory.

If I select Year 2010 and Weeks 13, 14, 15 and 16 but use a variable for the number of weeks I want to use for Average Inventory what expression do I use?

Average Week Variable = 2 ( Inventory / inventory for weeks 15 and 16? )

How do I find and calculate week 16 and 15 average inventory? from week number = 16 (the highest number selected in the select data range)

If the Variable was 3, then I would need Total Inventory for the time frame chosen divided by the sum of Inventory weeks 16, 15 and 14.

Any assistance would be much, much appreciated.

Tags (2)
2 Replies
Not applicable

Calculating Average Weeks and counting backwards based on Variable

Hi Candiceb,

Do you have a the answer to this trouble? I'm trying to do the same and I'm really confused.

Thanks,

Not applicable

Calculating Average Weeks and counting backwards based on Variable

Hi,

This may help you a little bit, I use it for calculating the weeks of inventory base on average sales for previous 13 weeks.

Sum ([Inventory]) / RangeAvg( Before( SUM([Sales]),0,13))

Community Browser