Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
SriGaG
Frequent Visitor

Ranking based on two dimensions

Hi Experts

 

I have an issue in ranking

 

I have a table which contains three columns. first is Reportname, second is userid, third is count of views. What i need is i neeed to rank the user report by count of views. I have tried so hard and i cannot achieve it.. Can anyone help me? The below is the snapshot of my requirement. Im using a direct query environment. so i cannot use functions suc as earlier.

 

 

reportusercount of viewsrequired rank
R1U134
R1U243
R1U325
R1U452
R1U671
R1U826
R2U161
R2U323
R2U432

 

 

ranking method need to be unique ranking. Can anyone help me. This is little bit urgent

 

 

 

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @SriGaG ,

Please try:

ranking = RANKX(FILTER(ALL('Table1'),'Table1'[report]=MAX('Table1'[report])),[count of views],,DESC,Dense)

vcgaomsft_0-1694500195359.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

4 REPLIES 4
v-cgao-msft
Community Support
Community Support

Hi @SriGaG ,

Please try:

ranking = RANKX(FILTER(ALL('Table1'),'Table1'[report]=MAX('Table1'[report])),[count of views],,DESC,Dense)

vcgaomsft_0-1694500195359.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Ashish_Mathur
Super User
Super User

Hi,

Assuming Count of value is a measure, write this measure

Measure = rankx(all(Data[user]),[Count of value])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you @ashish for the prompt response . I have tried this Calc so many times. But not givin the desired outcome . I have several filters applied for the visual too. But this isn't working . 

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.