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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

HELP - A measure to rank the dynamic(filtered) dates column in Ascending order.

I have a column with start dates. I included an index (Rank) column starting from 1.

 

Let's say:

 

Start Dates:         Rank Column

a                                   1

b                                   2

c                                    3

d                                    4

e                                    5

 

After applying the filters:

 

The table looks like this:

 

Start Dates:         Rank Column

b                                   2

d                                   4

e                                   5

 

 

But I need :

 

Start Dates:         Rank Column

b                                   1

d                                   2

e                                   3

 

And I will be using that rank column to lookup the start date values in another If condition.

 

Any help will be appreciated.

 

THanks!

3 REPLIES 3
MFelix
Super User
Super User

Hi @Anonymous ,

 

Try to add the following measure:

 

Measure =
CALCULATE (
    COUNTROWS ( ALLSELECTED ( 'Table'[Start Date] ) );
    FILTER (
        ALLSELECTED ( 'Table'[Start Date] );
        'Table'[Start Date] <= MAX ( 'Table'[Start Date] )
    )
)

Should do the trick

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Anonymous
Not applicable

Thanks for your reply!

But after applying your measure, I'm just not getting what I wanted.

Capture.PNG

 

Instead of getting 1 and 2, I'm gettign the original rank.

 

How do I remove duplicates in this?

For example, I have Jan - 2 four times in my start date. And everything is ranked the same number.

 

THanks,

Anand

Hi @Anonymous ,

 

Based on my test with repeat dates in the the calculations are correct, what measure are you calculating?

 

Can you share a sample file?

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





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.