cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
palvarez83 Regular Visitor
Regular Visitor

Create sort column with duplicates based on another column

 

Hello,

I have the dimension table dPAU  pictured below that was created with Power Query.  In Power query I sorted the PAU based on the dates on the second column and created an index column dPAU[Sort] that I can use to sort the dPAU[PAU].

 

I would like sort the dPAU[Module column], based on another column, but there are duplicates.  In the larger data set, these duplicates can have differenent dates associated with them.  My instinct is to create a calculated column  that ranks each module based on the earliest date.  If a module has duplicates it should use the earliest of the dates for its ranking and would return the same rank for each set of duplicates.  Not sure where to start or which DAX functions to use.   Any help would be appreciated.

 

Thank you,

Capture.PNG

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Create sort column with duplicates based on another column

Hi @palvarez83 ,

You can take a look at following blog to know how to create a sorting table to achieve your requirement:

Custom Sorting in Power BI

Regard,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
palvarez83 Regular Visitor
Regular Visitor

Re: Create sort column with duplicates based on another column


@v-shex-msft wrote:

Hi @palvarez83 ,

You can take a look at following blog to know how to create a sorting table to achieve your requirement:

Custom Sorting in Power BI

Regard,

Xiaoxin Sheng



@v-shex-msft wrote:

Hi @palvarez83 ,

You can take a look at following blog to know how to create a sorting table to achieve your requirement:

Custom Sorting in Power BI

Regard,

Xiaoxin Sheng


Hi,

Yes, I can do it with Power Query index column.  That's what I did for the PAU.... but for the Module I have duplicates and would like to do it with DAX in the data model.

Community Support Team
Community Support Team

Re: Create sort column with duplicates based on another column

HI @palvarez83 ,

If you can please share a pbix file with some sample data and expected result for test.

Notice: do mask on sensitive data before share.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors