Add a PercentileRank function
- Dominant language
- Clojure
- Stars
- 49.3k
- Forks
- 6.8k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 653
Description
Need a PercentileRank function in FarosAI, much like what exists in Excel:
**Percentile Ranking**
1. Determine which field/column you want to calculate percentile ranking for
2. Order (Asc/Desc) needs to be taken into account depending on what the user is trying to achieve. The data point might require descending sort as larger number would be considered "top 99th percentile". Another data point might mean a smaller number is "better" or "top 99th percentile"
3. Apply sequential rank order (1 thru x number of records); let's call this \[Rank\]
4. How to calculate the PercentileRank: `1 - ([Rank] - 1) / (Count of rows - 1)`
Contributor guide
Research direction
The issue names no files, tests, or entry points; first locate how Metabase defines and exposes query functions similar to Excel functions. Verify how ascending and descending ordering should affect the supplied formula, then add coverage for the expected percentile values. Done means PercentileRank is available and follows the stated ranking formula.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- analytics, data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100