cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-43328%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EWie%20berechne%20ich%20ein%20Verh%C3%A4ltnis%20mit%20negativen%20Zahlen%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43328%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EOhne%20Scripting%20m%C3%B6chte%20ich%20eine%20Formel%20erstellen%2C%20die%20ein%20Verh%C3%A4ltnis%20zwischen%20zwei%20Spalten%20von%20CAGR-Prozents%C3%A4tzen%20berechnet%2C%20wobei%20ber%C3%BCcksichtigt%20wird%2C%20dass%20einige%20der%20Prozents%C3%A4tze%20negativ%20sind%20(dh%2C%20eine%20einfache%20Unterteilung%20reicht%20nicht%20aus).%20Eine%20Formel%2C%20die%20dies%20erreichen%20k%C3%B6nnte%2C%20ist%3A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20100px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22formula.JPG%22%20style%3D%22width%3A%20100px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F7214i7DB3E0ED9CD820EF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22formula.JPG%22%20alt%3D%22formula.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWenn%20die%20obige%20Formel%20funktionieren%20w%C3%BCrde%2C%20wie%20w%C3%BCrde%20ich%20das%20Komma%20in%20die%20JMP-Formelbox%20einf%C3%BCgen%3F%20Oder%20gibt%20es%20einen%20besseren%20Weg%2C%20um%20das%20Verh%C3%A4ltnis%20zu%20berechnen%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43330%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Wie%20berechne%20ich%20ein%20Verh%C3%A4ltnis%20mit%20negativen%20Zahlen%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43330%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIch%20habs.%20War%20mir%20der%20Notation%20f%C3%BCr%20das%20Komma%20nicht%20sicher.%20Vielen%20Dank.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-43329%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Wie%20berechne%20ich%20ein%20Verh%C3%A4ltnis%20mit%20negativen%20Zahlen%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-43329%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eabs(x-y)%2Fmax(abs(x)%2Cabs(y))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EDie%20Funktionen%20sind%20verf%C3%BCgbar%20unter%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BHilfe%20%3D%3D%26gt%3B%20Skriptindex%20%3D%3D%26gt%3B%20Funktionen%2C%3C%2FP%3E%0A%3CP%3Eoder%20im%20Formeleditor%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
rj69
Level III

How do I calculate a ratio with negative numbers

Without using scripting, I want to create a formula that computes a ratio between two columns of CAGR percentages, taking into account that some of the percentages are negative (meaning simple division will not suffice). A formula that might accomplish this is:formula.JPG

If the above formula would work, how would I incorporate the comma in the JMP formula box? Or, is there a better way to compute the ratio?

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How do I calculate a ratio with negative numbers

abs(x-y)/max(abs(x),abs(y))

The functions are available at:

     Help==>Scripting Index==>Functions,

or in the Formula Editor 

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How do I calculate a ratio with negative numbers

abs(x-y)/max(abs(x),abs(y))

The functions are available at:

     Help==>Scripting Index==>Functions,

or in the Formula Editor 

Jim
rj69
Level III

Re: How do I calculate a ratio with negative numbers

Got it. Wasn't sure of the notation for the comma. Thank you.

Recommended Articles