cancel
Showing results for 
Search instead for 
Did you mean: 
0

How to change sequence of char type data within a slicer manually?

I have a list in PBI report, as 4x100 and 8x100 are char type, all the other numbers in the same column are sharing char type which resulted in the sequence of the list is like this: 10, 100, 15, 20, 200, 4x100, 5, 8x100

Is it possible I can change the sequence so that they can be arranged from smaller to larger like this: 5, 10, 15, 20, 100, 200, 4x100, 8x100 ?

Status: Delivered
Comments
Moderator

@q16087,

You can add an index column in Query Editor of Power BI Desktop.

1.PNG

Then click your column, and sort it by Index column as shown in the following screenshot.
2.PNG

Regards,
Lydia

Moderator
Status changed to: Delivered
 
Frequent Visitor

The idea looks good, however my data is saved in Azure server database, and I used Visual Studio to pull the data (table/view) from SQL DB in Azure server, then build/deploy to PowerBI, in this case 'Edit Queries' option under 'Query Editor' in Power BI is invisible to me, also 'Sort by Column' is invisible to me under 'Modeling' tab Smiley Sad  

Moderator

@q16087,

What do you mean that "use visual studio to pull data from SQL DB in Azure server, then build/deploy to PowerBI"? Do you connect to Azure Analysis Service using connect live mode in Power BI Desktop? If so,  you would need to define the sort order and sort column in the data source.

Regards,
Lydia

Frequent Visitor

I'm not familiar 'connect live mode' in Power BI Desktop, but there is only report icon on the left, there is no relationship icon there, and all the relationship management is done in Visual Studio, all the tables are visible and editable only in Visual Studio instead of Power BI.

Frequent Visitor

This issue has been resolved through defining the sort order and sort column in Visual Studio, thanks!