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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply

Rank based on Ranked Index

I am trying to find the average time spent in status or with a set issue. I have created a hierarchical sort in the Power Query Editor based on the issue category, initiative key, and the update date. Then, I added an index column, which I created a ranked index for each Initiative key, as seen here: 

DAXtheDestroyer_0-1657833222815.png

resulting in the table seen here (sensitive data removed):

DAXtheDestroyer_1-1657833260087.png

I would like to create a ranked column for each consecutive issue following the same process here and another for each consecutive R/Y/G status, that resets for each initiative key . Perhaps a "Ranked Issue" and "Ranked Status" column?

Something like this:

DAXtheDestroyer_2-1657835697981.png

(Apologies for my hasty photo editing skills)

Using the rankings, I believe I can ultimately calculate the average maximum ranking of issue or status to show the average amount of weeks they impact projects (initiative keys). Every entry is conducted weekly to append the table, and the rank could artificially serve as a dynamic counter of those consecutive weeks. I would like to show cards similar to these which I previously mocked up:

DAXtheDestroyer_3-1657835788847.png

 

DAXtheDestroyer_4-1657835796188.png

Thank you.

 

3 REPLIES 3
amitchandak
Super User
Super User

@DAXtheDestroyer , Create two new columns

 

Rankx(filter(Table, [Issue Id] = earlier([Issue_id])) , [Index],asc,dense) //you use date inplace of index

 

and

 

Rankx(filter(Table, [Issue Id] = earlier([Issue_id]) && [Issue category short] = earlier([Issue category short]) ) , [Index],asc,dense) //you use date inplace of index

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

This does work with the change in issues. However, I cannot replicate it for the status changes because if on initiative key has multiple issues assigned, they will have repeated rows for each extra issue. This causes the status ranking counter to continue rather than resetting at the change of issue, as seen below for Initiative Key 213. 

DAXtheDestroyer_0-1657912221157.png

The R/Y/G column drives the "On Track Status" column, and we see that there are really only 11 consecutive weeks of "Missing" status, rather than 22.

I believe I solved the running counter problem, seen below:

DAXtheDestroyer_0-1657919108936.png

Is there a way to calculate the average maximum rank for the new columns?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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