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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
NOVICE02
Helper III
Helper III

Re arrange columns in matrix

Hi all, 

 

I can't figure out how to re arrange the columns... conditional column won't work with direct query...

 

I need Pre before Post and the name has to remain the same. I thought about adding a prefix but not an option..


Apprecite any direction

 LivePostPre
1   
2   
3   
1 ACCEPTED SOLUTION

Hi @NOVICE02 ,

 

Because you are using DirectQuery Mode, so we think adding custom column will not work ( it is still an awesome solution in Import Mode, thanks @Anonymous ). We can create a calculated table using DATATALE function and make the type column sort by another value, then use the type in the new table as the column field to meet your requirement.

 

Table =
DATATABLE (
    "Type", STRING,
    "Sort", INTEGER,
    {
        { "Live", 1 },
        { "Pre", 2 },
        { "Post", 3 }
    }
)

 

3.jpg

2.jpg

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Have you tried re-arranging the order of the columns within the Matrix visualization properties?

 

MatrixColumnsRearrange.PNG

 

@Anonymous good point but that is only possible if you write 3 different measure and each measure is filtering each specific value 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@NOVICE02 at the backend, you should have sort column and then in modelling tab you sort your column (Pre Post Live) with this sort order column and that will do it.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

So Pre Post Live are not columns but values of variabe "Type" which is then put into the column field of the matrix

Hi @NOVICE02 ,

 

Because you are using DirectQuery Mode, so we think adding custom column will not work ( it is still an awesome solution in Import Mode, thanks @Anonymous ). We can create a calculated table using DATATALE function and make the type column sort by another value, then use the type in the new table as the column field to meet your requirement.

 

Table =
DATATABLE (
    "Type", STRING,
    "Sort", INTEGER,
    {
        { "Live", 1 },
        { "Pre", 2 },
        { "Post", 3 }
    }
)

 

3.jpg

2.jpg

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It worked! amazing, thank you so much. Apologies for the delay, was away.

 

thanks again,

Anonymous
Not applicable

@NOVICE02 , @parry2k  I see the "miss" on my end with what you're asking for. With that said, @parry2k is correct with his suggestion. If you don't already have a number column to sort on, create a column that stores a number based on the value of the [Type] field. (i.e. if [Type] = "Pre" then 1 else if [Type] = "Post" then 2 else if [Type] = "Live" then 3). Then sort the [Type] column based on this number column just created. The sorting would be done within the Data pane view.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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