Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] SUBTOTAL Is '0" (Zero) With Conditional Compute. Need Help Fixing
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] SUBTOTAL Is '0" (Zero) With Conditional Compute. Need Help Fixing
 Login/Join
 
Gold member
posted
Hello,

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
SUM
	COLVAL NOPRINT
	CNT_RAF NOPRINT
	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 ''
	RAF_CURRENT NOPRINT
	MEM_CURRENT NOPRINT
	RAF_PREVIOUS NOPRINT
	MEM_PREVIOUS NOPRINT
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
END

 


I am currently in 8201

Thanks in Advance!

This message has been edited. Last edited by: Brandon Andrathy,


WebFOCUS 8201
 
Posts: 50 | Registered: July 10, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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;
ACROSS SEATS
BY COUNTRY
BY CAR
ON COUNTRY RECOMPUTE
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1918 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
Wow! You are definitely on top of your game. That was exactly what was happening Smiler . Worked like a charm. Thanks a ton!!!


WebFOCUS 8201
 
Posts: 50 | Registered: July 10, 2018Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] SUBTOTAL Is '0" (Zero) With Conditional Compute. Need Help Fixing

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.