Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

hard calculation in range of weeks

Hi community,

I need a help on a calculation, and after many tries, I still can't find the solution of my problem, here is the situation:

My field is already created, it is called Week and contains as values : 2017W01, 2017W02 ..to.. 2017W28

what i want to do is :

Calculate, for each week 'x' in my field the following amount :

         1 -  [   (sum of the 'MP1' for the weeks : "x-4" to "x")     /     (sum of the 'WOL' for the weeks :"x-4" to "x")   ]

1 Solution

Accepted Solutions
kenphamvn
Creator III
Creator III

Hi

Try

1- Above(Sum(MP1),0,4)/Above(Sum(WOL),0,4)

Regards

View solution in original post

3 Replies
kenphamvn
Creator III
Creator III

Hi

Try

1- Above(Sum(MP1),0,4)/Above(Sum(WOL),0,4)

Regards

sunny_talwar

You can also look into this

The As-Of Table

Not applicable
Author

Thank you for your help,

I tried this expression and It worked very well :

1- ( ( RangeAvg( above( Sum([Nb MP 7 days] ),0,5 ) ) ) /  (RangeAvg( above( Sum( [Nb WOL 7 days] ),0,5) ) ) )