Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jacek2703
Contributor II
Contributor II

Dynamic calculated field (WOI)

Hi guys,

how to insert a dynamic calculated field (WOI - week of inventory) into a table, calculated as the quotient of the inventory from a given week and the average sales from the last 8 weeks?

Dimension - [Fiscal Week] (Table 'Calendar')

Measures - [# Stock] (Table 'INV'), [# Sales Out] (Table 'SO')

Sending over excel example.

jacek2703_0-1628869016725.png

Thank you in advance!

J.

 

1 Reply
NageshSG
Partner - Contributor III
Partner - Contributor III

Hi @jacek2703 

Here is one workaround (qvw file attached) to handle this in the script side by creating a bridge link table to Data table. The user can change the WOI range in the input box but requires a reload.

NageshSG_0-1629610127743.png

 

To make this work across fiscal years, you need to create an autonumber key of the FiscalWeek so that dynamically WOI Range bucket can be handled easily.

Hope this works and you can enhance further to meet more complex scenarios.

Regards.