Forum Discussion

thaller's avatar
thaller
New Member
5 years ago

Dynamic ranking based on a matrix

Hi all,

 

I am rather new to PowerBI and I am trying to get a dynamic ranking. My current data is structured as follows:

Trade IDDateAsset ClassBrokerTrade amount
X0000110.01.2019CreditBARCLAYS     50 000 000.00
X0000220.06.2019CreditBARCLAYS     25 000 000.00
X0000320.01.2020CreditJPM     15 000 000.00
X0000420.01.2020CreditJPM     20 000 000.00
X0000530.03.2020MBSRBC     60 000 000.00
X0000619.12.2019MBSBNP   800 000 000.00
X0000721.02.2021MBSBARCLAYS        3 000 000.00
X0000804.03.2020MBSBNP     40 000 000.00
X0000910.01.2019CreditJPM     50 000 000.00
X00001020.06.2019MBSBARCLAYS     25 000 000.00
X00001120.01.2020CreditJPM     15 000 000.00
X0000721.02.2021MBSBNP        6 000 000.00

 

I would like to be able to rank each brokers within each asset class for each different year (e.g. BARCLAYS is best broker in 2019 for Credit). The criterion for ranking would be the sum of trade values (highest sum = highest ranking). As an intermediary result I think the matrix should look like the following:

 Credit MBS  
 20192020201920202021
BARCLAYS                  1                 2                 2
BNP                  1                              2                1
JPM                  2                              1   
RBC                                 1 

 

Utlimately I would like to display the results by single broker in the report as follows

Barclays201920202021
Credit100
MBS202

 

A contraint is that I need to keep these rankings dynamic as the user can:

- determine the time frame (e.g. ranking only on the time period 07/2019-06/2020)

- determine which broker to integrate 

Therefore I don't find it possible to implement a ranking by measures at the database level because it is then unaffected by the time slider.

 

Any help would be appreciated

Thank you

Thomas

1 Reply