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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
kasife
Helper V
Helper V

Ranking

Hi guys,
I've been trying different ways to create a ranking, but without success

I would like to create an index measure by city and project, sorted by date.
Someone could help me ?

https://ufile.io/py9vncsk


This is the result I would like to get

kasife_1-1687318515433.png

 

 

 

 

1 ACCEPTED SOLUTION

Hi @kasife ,

Based on the linked pbix, you used the latest release date by project to get the index but the dates on your screenshot do not match with your pbix.

danextian_0-1687325010826.png

That aside, if you want to use the latest date, create a calculated column for that first and then use that calculated column in RANKX.

Latest Release Date by Project = 
CALCULATE ( MAX ( Tabela[Realese Date] ), ALLEXCEPT ( Tabela, Tabela[Project] ) )
Index = 
RANKX (
    FILTER ( Tabela, Tabela[City] = EARLIER ( Tabela[City] ) ),
    Tabela[Latest Release Date by Project],
    ,
    ASC,
    DENSE
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

Hi @kasife ,

 

Try this as a calculated column

rank =
RANKX (
    FILTER ( 'DataTable', 'DataTable'[city] = EARLIER ( 'DataTable'[city] ) ),
    'DataTable'[Date],
    ,
    ASC,
    DENSE
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian 
The ranking is still not giving the result I would like.

Below I put what it is returning me and the result I would like to get

kasife_0-1687321864548.png

 

Hi @kasife ,

Based on the linked pbix, you used the latest release date by project to get the index but the dates on your screenshot do not match with your pbix.

danextian_0-1687325010826.png

That aside, if you want to use the latest date, create a calculated column for that first and then use that calculated column in RANKX.

Latest Release Date by Project = 
CALCULATE ( MAX ( Tabela[Realese Date] ), ALLEXCEPT ( Tabela, Tabela[Project] ) )
Index = 
RANKX (
    FILTER ( Tabela, Tabela[City] = EARLIER ( Tabela[City] ) ),
    Tabela[Latest Release Date by Project],
    ,
    ASC,
    DENSE
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian thanks so much

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.