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

Need help swapping columns in Matrix Table

Hi

 

Can someone please tell me how I swap 2017 and 2018 in the date column in a matrix table? 

 

Currently 2017 is showing first. I want 2018 to show first, followed by 2017. 

 

Please see imgur here: https://imgur.com/a/GZOSifR    (try coping and pasting into search browser)

 

Thanks!

1 ACCEPTED SOLUTION

Hi @gussiie,

 

Normally, matrix column header is not supported for sort by in power bi currently.

 

You could try this workaround below and have a reference of this blog.

 

1. Create a table with date and index

2. Create the relationship between the tables and create the calculated column year.

3. Sort calcualted column year by Index.

4. Create the matrix with calculated column year and Date hierarchy Quarter as column.

 

Capture.PNG

 

More details, you could refer to this attachment.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
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
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @gussiie,

 

Unfornately, I cannot open your shared URL, it seems to be a 404 page. 

 

In addition, I'm a little confused about your requirement. Do you want to show the matrix with 2018 data first then show 2017 data?

 

If it is, you could create the date Slicer with Year column to filter the matrix data. 

 

In addition, you also could use Bookmark feature to achieve your requirement.

 

If you still need help, please share some data sample and your desired output so that we could help further on it.

 

Best Regards,

Cherry

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

Hi 

 

Thanks for your response. I am not sure what you mean by slicer but I simply want to swap the below picture around so 2018 is first.

 

Power BI Question.png

 

Can you please direct me on how to do this. 

 

Thanks. 

Hi @gussiie,

 

It seems that you want to get the output like below.

 

Untitled.png

 

If it is, please click the more option and select Sort Descending, check if this could achieve your requirement.

 

Best  Regards,

Cherry

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

Hi 

 

This does not work. It will only sort the rows or values. It does not sort the columns or give me an option to sort date by descending. 

 

2018-10-17_0908.png

 

Are there any other ways?

Hi @gussiie,

 

Normally, matrix column header is not supported for sort by in power bi currently.

 

You could try this workaround below and have a reference of this blog.

 

1. Create a table with date and index

2. Create the relationship between the tables and create the calculated column year.

3. Sort calcualted column year by Index.

4. Create the matrix with calculated column year and Date hierarchy Quarter as column.

 

Capture.PNG

 

More details, you could refer to this attachment.

 

Best Regards,

Cherry

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

Thank you so much!

 

I love this community!

Hi @gussiie,

 

You're welcome!Smiley Very Happy

 

Best Regards,

Cherry

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

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.