Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How to get TOPN records in case of duplicates

Received Response
1
Views
1
Comments
Kari_100683-Oracle
Kari_100683-Oracle Rank 3 - Community Apprentice

I'm using Obiee 12.2.1.4.0. I've a requirement to display top 5 records based on "Balance" fact. For some customers the "Balance" Amount is same. When I use TopN /Rank function it assign same rank to all duplicate balance value as below and return more than 5 records.

Customer Balance Rank

Test1 $1000 1

Test2 $800 2

Test3 $500 3

Test4 $200 4

Test5 $200 4

Test6 $0 5

Test7 $0 5

Test8 $0 5

I can't use rowcount as this is a union report. Can someone please help?

Answers

  • Jerry Casey
    Jerry Casey Rank 6 - Analytics Lead

    That's exactly how the function works. If you had 10 records that were each $1000, which ones would be the top 5? You can add "By" clauses to the function, if there is some other attribute you want to qualify with.