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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Robyrubyjane
Frequent Visitor

DAX for range input

hi guys, so i have data like this,

Screenshot_20230209_155426.png

in tenant rank column i want to rank each siteID based on the oldest date, so if there is 4 same siteID&SiteName in tenant rank will be rank 1st tenant, 2nd tenant, 3rd tenant, 4rd tenant. like this,

Screenshot_20230209_160115.png

 

TIA

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Robyrubyjane

 

 try like: 

tenant rank = 
VAR _table=
FILTER(
    TableName, 
    TableName[SiteName] = EARLIER(TableName[SiteName]) 
)
RETURN
RANKX(
    _table,
    TableName[Rental Start],
    ,ASC
)

 

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

hi @Robyrubyjane

 

 try like: 

tenant rank = 
VAR _table=
FILTER(
    TableName, 
    TableName[SiteName] = EARLIER(TableName[SiteName]) 
)
RETURN
RANKX(
    _table,
    TableName[Rental Start],
    ,ASC
)

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.