Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi,
I should create a ranknumber but can not find how. I have a list of vessels with their departure date and departure time.
Sometimes multiple vessels are leaving the same day. For that day I would like to give them a ranknumber in the order they left.
So the first that day, the second, ...; I should become the table as shown below. Unfortunatly could not find the right manner or DAX code to do so. Thanks to anybody who could help me out!
Solved! Go to Solution.
You can use this calculated column
RANK Column = RANKX ( FILTER ( Table1, [Departure Date] = EARLIER ( [Departure Date] ) ), [Departure Time], , ASC, DENSE )
It works when i use some sample rows like your data
Could your Departure Date (for each day) be different due to time element
If it it is use this MEASURE
RANK = RANKX ( FILTER ( Table1, DATEVALUE ( [Deaprture Date] ) = DATEVALUE ( EARLIER ( [Deaprture Date] ) ) ), [Departure Time], , ASC, DENSE )
You can use this calculated column
RANK Column = RANKX ( FILTER ( Table1, [Departure Date] = EARLIER ( [Departure Date] ) ), [Departure Time], , ASC, DENSE )
Thanks, but unfortunately the output is only 1.
It works when i use some sample rows like your data
Could your Departure Date (for each day) be different due to time element
If it it is use this MEASURE
RANK = RANKX ( FILTER ( Table1, DATEVALUE ( [Deaprture Date] ) = DATEVALUE ( EARLIER ( [Deaprture Date] ) ) ), [Departure Time], , ASC, DENSE )
Thanks a lot Zubair! Indeed, I send you this example but am acually working on another file (confidential info). There it didn't work, but it the example it does. So yes must be something with the date value! Thanks a lot!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
68 | |
54 | |
53 | |
36 | |
34 |
User | Count |
---|---|
84 | |
71 | |
55 | |
45 | |
43 |