<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482728#M72704</link>
    <description>&lt;P&gt;You can use the Quantiles statistic within the Tabulate platform (Analyze&amp;gt;Tabulate).&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2022 12:15:24 GMT</pubDate>
    <dc:creator>David_Burnham</dc:creator>
    <dc:date>2022-04-28T12:15:24Z</dc:date>
    <item>
      <title>JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482707#M72703</link>
      <description>&lt;P&gt;Would like to find the percentile of a number within a data set. What percentage of values are above/below a certain number? Other than eyeballing a CDF or Prob Dist chart is there an existing path to get this number or is this a JSL task?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 20:50:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482707#M72703</guid>
      <dc:creator>WoHNY</dc:creator>
      <dc:date>2023-06-10T20:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482728#M72704</link>
      <description>&lt;P&gt;You can use the Quantiles statistic within the Tabulate platform (Analyze&amp;gt;Tabulate).&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 12:15:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482728#M72704</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2022-04-28T12:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482776#M72709</link>
      <description>&lt;P&gt;You can do this by a formula or JSL snippet as you like, see screenshot and script below.&lt;/P&gt;
&lt;P&gt;The first part of the formula generates the table for values and percentiles, the second looks up the percentile for the current row.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Georg_0-1651153768761.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42085i1F3FB93EF07F502C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Georg_0-1651153768761.png" alt="Georg_0-1651153768761.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );

dt &amp;lt;&amp;lt; New Column( "PercentileRank",
	Formula(
		cdf_arr = CDF( :weight &amp;lt;&amp;lt; get values );
		cdf_arr[2][Loc( cdf_arr[1], :weight )];
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 13:51:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482776#M72709</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2022-04-28T13:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482820#M72714</link>
      <description>&lt;P&gt;David:&lt;/P&gt;&lt;P&gt;Thank you for the response. I was familiar with the Quantile statistic. With this I am specifying the Quantile and JMP is generating the value that matches that Quantile. I want to specify the value and generate the Quantile. My initial explanation was insufficient.&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 15:29:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482820#M72714</guid>
      <dc:creator>WoHNY</dc:creator>
      <dc:date>2022-04-28T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482862#M72719</link>
      <description>&lt;P&gt;Georg:&lt;/P&gt;&lt;P&gt;Thank you for your input. I adjusted the JSL to match my table and column name but I am guessing this is a very processor intensive calculation. It has been over 20 minutes and the wheels are still turning. I have about 240K rows of data to deal with. It looks like I'll stick with the Excel method I set up until I can find time to investigate this issue in more depth. Thanks again.&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 16:05:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482862#M72719</guid>
      <dc:creator>WoHNY</dc:creator>
      <dc:date>2022-04-28T16:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482976#M72728</link>
      <description>&lt;P&gt;Here is a JMP Function using the exact methodology used in the Excel function, PERCENTILERANK as described in the MicroSoft Excel help page&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.microsoft.com/en-us/office/percentrank-function-f1b5836c-9619-4847-9fc9-080ec9024442" target="_self"&gt;https://support.microsoft.com/en-us/office/percentrank-function-f1b5836c-9619-4847-9fc9-080ec9024442&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below I have provided the example table from the help page, along with the JMP function I created&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

New Table( "Excel Example",
	Add Rows( 10 ),
	New Column( "Data",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Values( [13, 12, 11, 8, 4, 3, 2, 1, 1, 1] )
	)
);

dt = Current Data Table();

percentRank = Function( {col, value},{default local},
	mydt = Current Data Table();
	theValue = .;
	theRows = mydt &amp;lt;&amp;lt; get rows where( As Column( mydt, col ) == value );
	If( N Rows( theRows ) &amp;gt; 0,
		gt = Col Number( If( As Column( mydt, col )[Row()] &amp;gt; value, Column( mydt, col )[Row()], . ) );
		lt = Col Number(
			If( As Column( mydt, col )[Row()] &amp;lt; value &amp;amp; Is Missing( As Column( mydt, col )[Row()] ) == 0,
				As Column( mydt, col )[Row()],
				.
			)
		);
		theValue = lt / (lt + gt);
	,
		lower = upper = .;
		lower = Col Max( If( As Column( mydt, col ) &amp;lt; value &amp;amp; Is Missing( As Column( mydt, col )[Row()] ) == 0, Column( mydt, col )[Row()], . ) );
		upper = Col Min( If( As Column( mydt, col ) &amp;gt; value, Column( mydt, col )[Row()], . ) );
		
		// get the percentileRank for upper and lower
		upperPR = percentRank(col,upper);
		lowerPR = percentRank(col,lower);
		intervalPCT=(value-lower)/(upper-lower);
		theValue = lowerPR+(intervalPCT*(upperPR-lowerPR));

	);
	Return( theValue );
);

x = percentRank( "data", 8 );  // a data point found in the data
show("found in table",x);
x = percentRank( "data", 5 );  // a data point not found in the data
show("Not found in table",x);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 19:58:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482976#M72728</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-04-28T19:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482984#M72730</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/39782"&gt;@WoHNY&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;while others have provided fantastic solutions let me offer a more basic one. try the following script it is fast enough for me on a mediocre computer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = New Table( "rank percentile - example",
	New Column( "X", Numeric, "Continuous",  Formula( Random Normal( 20, 5 ) ), Set Selected ),
	New Column( "rank percentile", Numeric, "Continuous", Format( "Percent", 12, 0 ), Formula( Col Rank( :X ) / Col Number( :X ) ) )
);
dt &amp;lt;&amp;lt; Add Rows( 1000000000 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Ron&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 21:30:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/482984#M72730</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2022-04-28T21:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/483208#M72749</link>
      <description>&lt;P&gt;Ron:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks. It works great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 19:10:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/483208#M72749</guid>
      <dc:creator>WoHNY</dc:creator>
      <dc:date>2022-04-29T19:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 16.2 Equivalent to Excel PERCENTILERANK Function?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/483209#M72750</link>
      <description>&lt;P&gt;Jim:&lt;/P&gt;&lt;P&gt;Thank you for coding example provided. As I am trying to improve my JSL skills these types of examples are great tutorials. Once again I appreciate your input.&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 19:12:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-16-2-Equivalent-to-Excel-PERCENTILERANK-Function/m-p/483209#M72750</guid>
      <dc:creator>WoHNY</dc:creator>
      <dc:date>2022-04-29T19:12:19Z</dc:date>
    </item>
  </channel>
</rss>

