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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
odzelashvili1
Helper I
Helper I

RANKX issue

Hello PBI community 🙂

 

I want to solve this with RANKX function, but i dont get correct output.

 

My table looks like this:

odzelashvili1_0-1631875123132.png

where I mannualy added "Rank" column, this is what I want to get in power bi.

 

Logic is this: for every visit_key, i want to rank this visit_keys by time.

 

Any ideas?  

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@odzelashvili1 , Try a new column like

 

rank = rankx(filter(Table, [visit_key] =earlier([visit_key]), [Time],,asc,dense)

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@odzelashvili1 , Try a new column like

 

rank = rankx(filter(Table, [visit_key] =earlier([visit_key]), [Time],,asc,dense)

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you, I tried something similar, but doesnt worked, now its working.

 

I have another question, if I want to filter my table with more than 1 argument, can i use CALCULATETABLE function instead of filter?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors