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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

sorting issue

I have sorted by Payment but still my Quantile column is not sorted accordingly to the sorted payment by ascending order why ? please suggestI have sorted by Payment but still my Quantile column is not sorted accordingly to the sorted payment by ascending order why ? please suggestSame data but different tool has sorted correctly , I want to achieve this order in power biSame data but different tool has sorted correctly , I want to achieve this order in power bi

 

I have tried converting the data type of payments and quantile to fixed decimal , whole number but quantile column is still not in proper order as I displayed in the second figure. Please suggest

1 ACCEPTED SOLUTION

Hi @dineshkumar_vrv,

 

Currently, only one column can be sorted with the sort option in Power BI. Here is an idea about adding a multiple columns sort feature. You can vote it up and add your comments there to improve Power BI on this feature.

 

In addition, an alternative way to sort both payment column and Quantile column is using the formula(DAX) below to add a new calculate column in your table, then sort by the new created column. Smiley Happy

Column4 = Table2[payment]+Table2[Quantile]

c2.PNGr4.PNG

Regards

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

Hi @dineshkumar_vrv,

 

As I can spot in your first image, it looks like the table is sorted on the payment column instead in the Quantile column.

Can you click on the Quantile column to see if sorting works? 

 

sorting.JPG

I have tried sorting with quantile column before but the payment column's(52.74) is in the second place where as 52.74 should be in the first place rite ? I want both the columns to be sorted in ascending orderI have tried sorting with quantile column before but the payment column's(52.74) is in the second place where as 52.74 should be in the first place rite ? I want both the columns to be sorted in ascending order

Hi @dineshkumar_vrv,

 

Currently, only one column can be sorted with the sort option in Power BI. Here is an idea about adding a multiple columns sort feature. You can vote it up and add your comments there to improve Power BI on this feature.

 

In addition, an alternative way to sort both payment column and Quantile column is using the formula(DAX) below to add a new calculate column in your table, then sort by the new created column. Smiley Happy

Column4 = Table2[payment]+Table2[Quantile]

c2.PNGr4.PNG

Regards

Anonymous
Not applicable

Hi @dineshkumar_vrv,

 

The option @v-ljerr-msft is possible and as long as multi-sort columns is not supported a solution that would work. Only thing that I doubt is the possibility of false positions because of the addition of the quantile to the value.  You can also use ranking to sort in a calculated column.

 

Rank = 
RANKX(
	allselected(Table1[Payment]);
	Table1[Payment];
	;ASC
)

Formula have syntax error please look into the image Kindly suggest to resolve the errorKindly suggest to resolve the error

Anonymous
Not applicable

Post your code please, maybe the delimitters are different on your client? , instead of ; ?

 

Error Message : The syntax for ';' is incorrect. (DAX(RANKX( ALLSELECTED(Hospital_Gen_Res_QR[Payments]); Hospital_Gen_Res_QR[Payments]; ;ASC))).

 

 

Rank =
RANKX(
 ALLSELECTED(Hospital_Gen_Res_QR[Payments]);
 Hospital_Gen_Res_QR[Payments];
 ;ASC
)

Anonymous
Not applicable

Syntax is correct, try to change ; with , ? 

 

Rank2 =
RANKX(
ALLSELECTED(Table1[Payment]),
Table1[Payment],
,ASC
)

Anonymous
Not applicable

Use the approach @v-ljerr-msft mentioned or if you don't want to store the concatenated column use

Rank2 = 
RANKX(
 ALLSELECTED(Table1[Payment]);
 Table1[Payment]&"-"&Table1[Quantile];
 ;ASC
)

Ok Thank you ,v-ljerr-msft suggestion work well but with extra column.

 

Thank you formula worked but sorting issue still prevails , it sorts only the payment column in ascending and Quantile column is not sorted in ascending.

 

My requirement is to sort payment and quantile in ascending orderMy requirement is to sort payment and quantile in ascending order

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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