Solved

# Percentile calculation in WebI

Posted on 2011-09-15
2,557 Views
I understand what a percentile is and know about the WebI percentile function.

I need to determine the percentile of a value in a given set.

I have a report that shows the average time spent on a project based on the location of the project.  The database has values for all locations.  The requirement in to show the average time (a measure) for the selected location but they also want the percentile based on the complete set of times for all locations.

How can I calculate that.

I suspect it may be necessary to calculate it as a universe measure but i don't have control over the universe.

mlmcc
0
Question by:mlmcc
• 4
• 3

LVL 34

Expert Comment

> ... for the selected location ...

So the report is run for one location at a time?

If it was run for all locations for a project, then I guess you'd just need the average time for a location and the total time for all locations, but if you don't have all locations ...

I don't know how to handle that (my unfamiliarity with WebI is not helping :-).  I'm only posting this in case I'm wrong and you do have all locations in the report, in which case there is a slightly greater chance that I could help, but only slightly.  :-)

James
0

LVL 100

Author Comment

The report as written is filtered to a single location.  However I can add a query to the report (and probably will have to) to include all locations for the time frame.

My issue is if this were Crystal, I could use a subreport to get all the locations into an array and count how many the given location was better than and divide that number by the total count.

I am still learning how to do things in WebI and don't fully understand how to loop through the data to calculate what I want.

mlmcc
0

LVL 34

Expert Comment

Sorry.  Wish I could help.  Sounds like it could be a tough one.  Good luck.

James
0

LVL 100

Author Comment

I think we may have to build it in the universe.

mlmcc
0

LVL 34

Expert Comment

That does seem like it might be simplest, if you can do it.  Like add a total project time somewhere, so that you can just pull that into the report.  Otherwise, it seemed like the report would have to read the records for all locations, to get the total project time, but only show the location that you asked for.  That'd be easy enough to do in CR (inefficient, but easy) using suppression, but I don't know about BO.  Never had to do anything like that in BO.

James
0

LVL 100

Accepted Solution

mlmcc earned 0 total points
I actually figured it out early this morning.

There is a RANK function that returns the rank of the value over the dimension.
To use it I had to add a section to the report on the dimension.

Basic formula is
(Rank(Measure;(Dimension)) / Count(Dimension) IN REPORT)

mlmcc
0

LVL 34

Expert Comment

Great.  Glad you figured it out.

James
0

## Featured Post

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.