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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Filter text with date and take information

Hi, I have a shipment with port information. We can see it started from CHINA - JAPAN - USA - CAN - BRITAIN based on ETD.

weezzy_1-1664502510432.png

I would like to write dax to know the first port, second port, third, fourth and fifth port. And may use same logic for 1000+ order

weezzy_2-1664502586024.png

Is the logic like,

Port 1 = calculate(??, ETD = lowest)

Port 2 = calculate(??, ETD = second lowest)...

 

Please help me with this, thanks!

 

2 ACCEPTED SOLUTIONS
VahidDM
Super User
Super User

Hi @Anonymous 

 

Please download the attached file.

 

Output:

VahidDM_0-1664504470437.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

 

 

View solution in original post

tamerj1
Super User
Super User

Hi @Anonymous 
You can create a calculated column tht raks the orders then place it in a matrix visual. The only thing which I have doupt about is to make sure the date is actually a date type column not a text type column.

2.png1.png

Prot Order = 
"Order "
    & RANKX ( 
        CALCULATETABLE ( 
            'Table', 
            ALLEXCEPT ( 'Table', 'Table'[Order Number] ) 
        ),
        'Table'[ETD]
    ) 
Port = SELECTEDVALUE ( 'Table'[Dep] )

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @Anonymous 
You can create a calculated column tht raks the orders then place it in a matrix visual. The only thing which I have doupt about is to make sure the date is actually a date type column not a text type column.

2.png1.png

Prot Order = 
"Order "
    & RANKX ( 
        CALCULATETABLE ( 
            'Table', 
            ALLEXCEPT ( 'Table', 'Table'[Order Number] ) 
        ),
        'Table'[ETD]
    ) 
Port = SELECTEDVALUE ( 'Table'[Dep] )
Anonymous
Not applicable

Thanks! It works!!!

VahidDM
Super User
Super User

Hi @Anonymous 

 

Please download the attached file.

 

Output:

VahidDM_0-1664504470437.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

 

 

Anonymous
Not applicable

Thank you so much! It works!

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Solution Authors