I'm trying to use the sum of one column in my else condition from the GUI side.
Eg: FORECAST/P17.3 = IF '&REPORT_TYPE' EQ 'TRUE' THEN A ELSE Total(A);
I'm not able to understand how I can calculate Total(A) and use it in if-else condition.
Can anybody please suggest how this can be done?This message has been edited. Last edited by: MeM,
WebFOCUS 8.2.02 Windows, All Outputs
June 21, 2016, 07:09 PM
Waz
Not knowing exactly what you are doing, I would suggest a multiverb request.
Untested.
TABLE FILE CAR
SUM COMPUTE MAX_COST/D16 = DEALER_COST ;
BY COUNTRY
SUM DEALER_COST
COMPUTE FORECAST/P17.3 = IF '&REPORT_TYPE' EQ 'TRUE' THEN DEALER_COST ELSE MAX_COST;
BY COUNTRY
BY CAR
END
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
June 27, 2016, 08:22 AM
MeM
Thanks Waz for the response. I resolved the issue by creating another tables using using hold and by using WHERE WEEKENDINGDATE GE &FIRSTWEEKENDINGDATE; WHERE WEEKENDINGDATE LE &WEEKENDINGDATE;
This gives me the total of the column in between the first weekending date and the last weekending date. Here I have used firstweekendingdate and weekending date as variables.