Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anuhyak1
Creator
Creator

Convert multiple if conditions and aggr function into set analysis

Can we convert multiple if conditions and aggr function into set analysis. Please ,help me with the expression. Attached screenshot for reference.

=AGGR(If(
(
((Count (Distinct If (
([Initial Receipt Date] >= %CPStartDateRRF AND [Initial Receipt Date] <= %CPEndDateRRF AND STATE_ID <> 1 AND [ARGUS J calculated] <> 'ARGUS J case' AND
(RPT_TYPE_ID <> 10001002 AND RPT_TYPE_ID <> 10001003 AND RPT_TYPE_ID <> 10000701 AND RPT_TYPE_ID <> 10000101))
OR ([CF Follow-Up Date]>= %CPStartDateRRF AND [CF Follow-Up Date] <= %CPEndDateRRF AND STATE_ID <> 1 AND [ARGUS J calculated] <> 'ARGUS J case' AND
(RPT_TYPE_ID <> 10001002 AND RPT_TYPE_ID <> 10001003 AND RPT_TYPE_ID <> 10000701 AND RPT_TYPE_ID <> 10000101) AND Significant = 'Yes')
, EVENT_COUNTER))+vAlpha)/$(vRRFn2))
/
((Count (Distinct If (
([Initial Receipt Date] >= %PPStartDateRRF AND [Initial Receipt Date] <= %PPEndDateRRF AND STATE_ID <> 1 AND [ARGUS J calculated] <> 'ARGUS J case' AND
(RPT_TYPE_ID <> 10001002 AND RPT_TYPE_ID <> 10001003 AND RPT_TYPE_ID <> 10000701 AND RPT_TYPE_ID <> 10000101))
OR ([CF Follow-Up Date]>= %PPStartDateRRF AND [CF Follow-Up Date] <= %PPEndDateRRF AND STATE_ID <> 1 AND [ARGUS J calculated] <> 'ARGUS J case' AND
(RPT_TYPE_ID <> 10001002 AND RPT_TYPE_ID <> 10001003 AND RPT_TYPE_ID <> 10000701 AND RPT_TYPE_ID <> 10000101) AND Significant = 'Yes')
, EVENT_COUNTER))+vAlpha)/ $(vRRFn1))
) >= vRRF
AND
(Count (Distinct If (
([Initial Receipt Date] >= %CPStartDateRRF AND [Initial Receipt Date] <= %CPEndDateRRF AND STATE_ID <> 1 AND [ARGUS J calculated] <> 'ARGUS J case' AND
(RPT_TYPE_ID <> 10001002 AND RPT_TYPE_ID <> 10001003 AND RPT_TYPE_ID <> 10000701 AND RPT_TYPE_ID <> 10000101))
OR ([CF Follow-Up Date]>= %CPStartDateRRF AND [CF Follow-Up Date] <= %CPEndDateRRF AND STATE_ID <> 1 AND [ARGUS J calculated] <> 'ARGUS J case' AND
(RPT_TYPE_ID <> 10001002 AND RPT_TYPE_ID <> 10001003 AND RPT_TYPE_ID <> 10000701 AND RPT_TYPE_ID <> 10000101) AND Significant = 'Yes')
, EVENT_COUNTER))) >=vN
,
'Yes',Null()),[Preferred Term])

1 Reply
Anuhyak1
Creator
Creator
Author

Please, any suggestions on set analysis expression for bottom if conditions?