Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Compute Field for Business View - Count where a Dim Attribute equals a value

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Compute Field for Business View - Count where a Dim Attribute equals a value
 Login/Join
 
Member
posted
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:

SELECT COUNT(EVENT_SUBPART_ID)
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'
THEN CNT.CLMNT_RISK_RSRV_MTH_SNP_F.EVENT_SUBPART_ID
ELSE 0

Thank you

This message has been edited. Last edited by: FP Mod Chuck,


Application Edition
SQL Server
 
Posts: 14 | Registered: June 13, 2017Report This Post
Virtuoso
posted Hide Post
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


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
Hi Delana,

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');


Good luck

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Thanks so much!! It so simple after you explain it. The Define field did the trick!


Application Edition
SQL Server
 
Posts: 14 | Registered: June 13, 2017Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Compute Field for Business View - Count where a Dim Attribute equals a value

Copyright © 1996-2020 Information Builders