Disclaimer: I'm a novice with this App Studio language. I am trying to create a Computed Field for my Cluster's Business View. I want the Computed field to provide the count of Closed Claims (i.e. Event_SubPart_ID).
I know how to write it in SQL:
FROM CLMNT_RISK_RSRV_MTH_SNP_F AS F,
EVENT_SUBPART_STAT_DIM AS D
WHERE F.EVENT_SUBPART_STAT_KEY = D.EVENT_SUBPART_STAT_KEY
AND EVENT_SUBPART_STAT_GRP_NM = 'Closed'
However, I can't figure out the language within App Studio Compute field window. The below statement just ends up bringing the total Claim Count regardless of Status when used in Info Assist canvas.
IF EVENT_SUBPART_STAT_GRP_NM EQ 'Closed'
Thank youThis message has been edited. Last edited by: FP Mod Chuck,
Could be as simple as this:
JOIN EVENT_SUBPART_STAT_KEY IN CLMNT_RISK_RSRV_MTH_SNP_F TO EVENT_SUBPART_STAT_KEY IN EVENT_SUBPART_STAT_DIM AS J1 TABLE FILE CLMNT_RISK_RSRV_MTH_SNP_F COUNT EVENT_SUBPART_ID WHERE EVENT_SUBPART_STAT_GRP_NM EQ 'Closed'; END
Welcome to the Forum!
I think that your issue is with an understanding of the difference between COMPUTE and DEFINE.
Essentially (as near as makes no difference), a DEFINE is evaluated against each row within the source whereas a COMPUTE is evaluated against the returned answer set (e.g. the data is already aggregated as per your verb(s)).
So I would suggest that you create a DEFINE within your cluster synonym.
Also you can using boolean logic to determine closed count -
DEFINE CLOSED_CNT/I11 = (EVENT_SUBPART_STAT_GRP_NM EQ 'Closed');
Thanks so much!! It so simple after you explain it. The Define field did the trick!
|Powered by Social Strata|