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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ChumaAmako
Helper I
Helper I

Ranking with Filters

Hi  Team,

 

I must confess I am still a newbie to DAX,

 

I have a Table with which I wish to rank Visit Time based on Date and Staff ID. It looks like this:

 

Sample Data.jpg

 

I will like to have a Calculated Column that Ranks the Visit Time by Visit Date & StaffNo. Like this:

 

Expected Outcome.jpg

 

What Formula can I use for the calculated column.

 

You can view the above data in excel format here: https://drive.google.com/file/d/0Byxc8IzPhZ5-YUx3MnBlR0FjZ1U/view?usp=sharing

 

Thank you.

 

@Ashish_Mathur @v-ljerr-msft

1 ACCEPTED SOLUTION
chethan
Resolver III
Resolver III

@ChumaAmako

 

Follow the below steps

 

Create a New Calculated Column Datasheet

 

 

DateTime = Table3[Visit Date] &" " &Table3[Visit Time]
Rank = RANKX(ALL('Table3'),'Table3'[DateTime],,ASC) 

 

Snap.PNG

 

Regards,

Chetan K

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
chethan
Resolver III
Resolver III

@ChumaAmako

 

Follow the below steps

 

Create a New Calculated Column Datasheet

 

 

DateTime = Table3[Visit Date] &" " &Table3[Visit Time]
Rank = RANKX(ALL('Table3'),'Table3'[DateTime],,ASC) 

 

Snap.PNG

 

Regards,

Chetan K

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.