I used compute instead of Define and it worked. However, I have a column that I am doing CNT.DST and I want to use that number and divide it into sales but it does not work. What do I have to do to the formula to make it work?
If it works with COMPUTE, and not DEFINE, that means you want the division to be done on the AGGREGATED values, not on the details. You can use PCT.CNT.field in a calculation, exactly as you used the verb objects. Here's an example:
Code:
TABLE FILE CAR
WRITE RCOST DCOST CNT.DST.BODYTYPE
COMPUTE RATIO=100*RCOST/DCOST * CNT.DST.BODYTYPE;
BY COUNTRY
END
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.