×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

division

division

(OP)
I am using the define function and when I am doing the division function I am getting number that are not correct...  

I am dividing two P12 formats and trying to get a percentage...and it is not working out.

What am I doing wrong?

Thanks,
Kerry

RE: division

What numbers are you dividing, and HOW is the result incorrect?

RE: division

(OP)
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?

Thanks,

RE: division

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close