Forum Discussion

glmoon5's avatar
glmoon5
Icon for Helper I rankHelper I
1 year ago
Solved

Matrix Report Ranking

Hello,

 

I have a Matrix that has 4 levels in it.

 

Currently my last column is my Rank column that is broken.

 

At the top level there are 52 rows (will vary of course) and I want to rank them 1-52 in the last column (blue arrow) based on the result of the column to left (red arrow) , then when I expand all down one level in hierarchy I want to Rank those from 1 to whatever the number of rows are in level 2 and then repeat for level 3 and 4.

 

This give me the ability to understand that a row at level two that is ranked #1 doesn't not neccessarily have to come from the #1 ranked level 1.

 

This matrix has 3 slicers that might effect the context of what is showing

 

Any help?

 

16 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    glmoon5 What is the formula for your rank measure? What does your underlying data look like? Sorry, having trouble following, can you post sample data as text and expected output?
    Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

    Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

    • glmoon5's avatar
      glmoon5
      Icon for Helper I rankHelper I

      Greg_Deckler thank you for the response. I have reviewed the previous topic and not found a solution. I can certainly provide the data as text but a little unsure exactly which set of text? Export data from the Matrix visual? Go to table view and copy the raw table? When you mention use the table tool in the editing bar I am not sure where that is. Any guidance is greatly appreciated.

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        glmoon5 Read the second link that I posted, it demonstrates what data is needed and how to post a question properly so that all the information is available to answer it.

  • Hello

    Let me translate what you mention, you say that you have a table with 4 levels for example Region, Country, City, Store. You want the last column to be a dynamic ranking with column 1,2,3 at each level expanded separately. I imagine that you would also have slicers that when combining the context must respect the current level of expansion and not mix with other levels? You confirm to me if this is how you are asking since your order is not basic level.

    Thank you

    • glmoon5's avatar
      glmoon5
      Icon for Helper I rankHelper I

      Yes that is what I would like and yes I do have some slicers

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi glmoon5,

        Thank you  for reaching out to the Microsoft fabric community forum.
        Thank you Ashish_Mathur , Syndicate_Admin , Greg_Deckler , ajaybabuinturi for your reply regarding the Issue.

        Yes, what you're trying to do is fully possible in Power BI. We can create a DAX measure using ISINSCOPE() so that ranking changes automatically based on which level is expanded, and it will also follow whatever filters or slicers are applied. If you want, I can help you try this with some example data

        I tested it with my sample data, and it worked fine. Please find the attached Pbix for your reference.
        Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.
        Regards,
        Harshitha.