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
born_naked
Frequent Visitor

Table Column Sort/Reorder/Rearrange

I am a complete newbie to Power BI so this might be a stupid question. 

 

The gist is this: I have date period columns using the Matrix viz that are out of order. Data is not aggregated in pivot as data was prepared originally for ingestion in another app. Is there a way to set the order of columns in a data viz?

 

Or barring that, if I were to ingest unprocessed data and pivot and clean it in PowerBI is there a way to then set the order of the columns?

 

Longer question/more context:

I had for another application/use case used python to create a table that was designed to be pivoted without aggregation--possible with Tableau. Since each pairing is unique, I can pivot with aggregation just using sum or avg and don't have an issue with that. But the columns are quite out of order: 

 

Capture.PNG

 

The columns come from a custom date formatted field. I also have a column with the start date of each period and a column with a numeric value which I had used to sort the columns in other applications. I do not see an obvious option to either manually rearrange the columns or to do so automatically in Power BI. 

 

Thanks in advance

1 ACCEPTED SOLUTION

Hi @born_naked 

 

See below and see if I am misunderstanding.

You have data that looks like this. It is some form of a date, and this is uselessly sorted alphabetically, because it is text, and Power BI only sorts text alphabetically.

2020-05-21 13_02_48-Untitled - Power BI Desktop.png

I have another column in my table that I called Sort By.

2020-05-21 13_07_46-Untitled - Power BI Desktop.png

You'll notice that it is at the same granularity of what I want to sort.

I am going to select my Month name text column, select Sort by, select my Sort By column, and now the columns in my matrix are sorted the way I want.

2020-05-21 13_08_34-Untitled - Power BI Desktop.png

 

This is what was in the article I posted about at the top of this thread.

If I am still misunderstanding, please be very explicit in how it should look. Mock it up in Excel as to how it should look and post a screen cap.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

11 REPLIES 11

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.