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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.