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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator III

3 Month Calculation

Hi,

I have a straight table with 3 items:

1. LOT 1 - Lots per Month - Year

2. Defect - Defects per Month - Year

3. 3 Month Lot - I want the calculation for 3 Month Lot =

[ SUM(LOTS for 3 month) - COUNT (Defects for 3 month) ] / SUM(LOTS for 3 month)

For eg: If you look at the attached file the calculation for the 3 MONTH LOT under Mar 2012 :

(18 + 24 + 14) - (2+1+0) / (18 + 24 + 14) = 0.94

Regards,

H

1 Reply
jagan
Partner - Champion III
Partner - Champion III

Hi,

Can you attach some sample data? 

or Try this expressions

=(Sum({<DateDimensionName={'>=$(=MonthStart(Max(DateDimensionName), -2))<=$(=MonthEnd(Max(DateDimensionName)))'}>} LOTS) + Count({<DateDimensionName={'>=$(=MonthStart(Max(DateDimensionName), -2))<=$(=MonthEnd(Max(DateDimensionName)))'}>} DEFECTS) ) / Sum({<DateDimensionName={'>=$(=MonthStart(Max(DateDimensionName), -2))<=$(=MonthEnd(Max(DateDimensionName)))'}>} LOTS)

Hope this helps you.

Regards,

Jagan.