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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Pri26
Regular Visitor

Row-Wise Ranking of Values

Hello everyone!

I'm working with a matrix visual and trying to create a measure that allows me to rank values row-wise. My data is hierarchical with 2 levels. I want the ranks to dynamically update when I collapse or expand the hierarchical data. So far, I haven't been able to get this to work as intended. Has anyone encountered a similar issue or have suggestions on how to achieve this?

Thank you in advance for your help!
Capture.PNGCapture2.PNG

 

3 REPLIES 3
Pri26
Regular Visitor

Further Explanation:

1. I have a table which contains multiple attributes, such as "Clicks", "Impressions", etc.
2. For each of these attributes, there are scalar values which represent the sum of the `[VAL]` column for every month.
3. I want to rank these monthly values within each attribute, but not across them. This means:
- For the "Clicks" attribute: if Jan has a value of 12, Feb has 10, and March has 29, I want to rank them as Feb (1), Jan (2), March (3). This rank is isolated to just the "Clicks" attribute.
- The ranking restarts for the next attribute, say "Impressions". So, for "Impressions", if Jan has a value of 5, Feb has 15, and March has 8, the ranking would be Jan (1), March (2), Feb (3).
4. The end result should show ranks for each month within every attribute. This means the rank does not carry over from one attribute to the next, but starts anew.

In essence, I want a monthly rank for each attribute's values separately. The rank resets for each attribute, and is determined based on the monthly values of `[VAL]` for that attribute.

AilleryO
Memorable Member
Memorable Member

Hi,

Not easy to help you, without more information, but at least I can give you some hints.

Functions like HASONEFILTER or HASONEVALUE should help you to know if your are on a detail level (level 2) or on a main level (Metric).

HASONEFILTER(Level2), should returns true on detailed lines and false on main lines.

As soon as you know that, you can add up an IF or SWITCH function, to make a calculation or another one, depending on your position (main or detail row).

I hope it's clear enough... for you, to use in your poject ?

Let us know

Matrix VisualMatrix Visualraw dataset sampleraw dataset sample

Thanks for the suggestion @AilleryO .

I attempted to address this issue but wasn't successful. For a clearer understanding, I've provided screenshots showcasing the data and the visual I'm working on. I have hierarchal row values within a matrix visual, and the date is presented in columns. My goal is to rank the values horizontally, row by row.

I hope this explanation is clearer.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.