I'm trying to do a simple table file and I am trying to accommodate for missing on a BY line by doing BY TOTAL COMPUTE = IF FIELD IS MISSING THEN 'N/A' ELSE FIELD. When That happens, the table runs as expected, however the field name I originally tried to define displays as @2853_FIELD.
Does anyone know why this is happening and what I can do to fix it? Code example below:
TABLE FILE _ADM_STAR SUM PAIDAMT BY TOTAL COMPUTE FIELD/A100V MISSING ON = IF FIELD IS MISSING THEN 'N/A' ELSE FIELD; AS 'FIELD' ON TABLE SET ASNAMES ON ON TABLE SET HOLDLIST PRINTONLY ENDThis message has been edited. Last edited by: Brandon Andrathy,
Can you repro using the CAR file?
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
In looking at your compute named FIELD which is also referencing FIELD, I am assuming that you have another field named FIELD in the datasource? is that a defined field that you didn't include in the code?
BY TOTAL COMPUTE FIELD/A100V MISSING ON = IF FIELD IS MISSING THEN 'N/A' ELSE FIELD; AS 'FIELD'
Also, are you trying to TOTAL an alpha field? I've never seen a COMPUTE in a BY field before.
I agree with Danny-SRL that in order for us to help you, we need you to reproduce the error with a file from the ibisamp folder, like the car file, so that we can run the code on our end.
I figured it out. Instead of By total, I just did By compute and that did what I wanted it to . Closing it
This is a valid action to perform BY TOTAL COMPUTE …
A "BY TOTAL TOTAL" doesn't means that is sum the value. It means such as "perform once everything else is done".
In other words : once the WHERE SUM/PRINT and basic SORT (BY) are completed, create the new field FIELD based on the sentence next the equal sign.
BY TOTAL COMPUTE FIELD/A100V MISSING ON = IF FIELD EQ MISSING THEN 'N/A' ELSE FIELD; AS 'FIELD'
WF versions : Prod 22.214.171.124M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
|Powered by Social Strata|