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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
I am currently working with a table that has to have each value stored in the COLVAL_NEW COMPUTE Statement in the below code. I'm so so close however when I try to do a subtotal RECOMPUTE on the "BY PROVIDERNAME" field, the field within the IF SUMID EQ '3' statement has 0 values in the subtotal but populates for the ELSE COLVAL/CNT_RAF part of the statement. Can anyone explain why/how to fix it? The reason I need to use one field is because I'm using Universal Concatenation (MORE FILE).
TABLE FILE PREV_YEAR_NEW_1
COMPUTE COLVAL_DEC/P20.2 = IF TREND_DEC_2 EQ 'Y' THEN COLVAL/CNT_RAF ELSE 0; NOPRINT
COMPUTE COLVAL_NEW/P20.2 = IF SUMID EQ '3' THEN (RAF_CURRENT/MEM_CURRENT) - (RAF_PREVIOUS/MEM_PREVIOUS) ELSE COLVAL/CNT_RAF; AS ''
ACROSS COLID NOPRINT
ACROSS COLTXT AS ''
ACROSS DIMDATEKEYIDTRENDINGDATE NOPRINT
ACROSS TREND_DEC NOPRINT
ACROSS TREND_DEC_2 NOPRINT
ACROSS DATECALENDARKEY_YEAR_M AS ''
ACROSS DATECALENDARKEY_MONTH NOPRINT
ACROSS SUMID NOPRINT
ACROSS SUMTXT AS ''
BY DIMPROVIDERKEYID NOPRINT
BY PROVIDERNAME AS 'Provider' RECOMPUTE AS 'Provider'
BY HEALTHPLAN AS 'Health Plan'
BY CNT_MEMBER AS 'Current Population'
WHERE DIMPROVIDERKEYID NE MISSING OR 0
WHERE DIMDATEKEYIDTRENDINGDATE NE 0
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
I am currently in 8201
Thanks in Advance!This message has been edited. Last edited by: Brandon Andrathy,
Hi Brandon, This due to the fact that when you use RECOMPUTE all fields are summed and COMPUTEd fields are recomputed. Probably your SUMID is summed. See the following usine the CAR file:
TABLE FILE CAR
SUM RCOST DCOST SALES CNT.SALES
COMPUTE BSEATS/I3=SEATS / CNT.SEATS;
COMPUTE BRANDON/D9.2=IF BSEATS EQ 4 THEN DCOST / RCOST *100 ELSE SALES / CNT.SALES;
ON COUNTRY RECOMPUTE
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006