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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
LemondBI
New Member

Reorganizing Columns in Matrix

Hello, 

 

I am new to developing in Power BI and am trying to replicate, as best as i can, a previous report. The report shows Revenue by quarter for two differnent time periords, Previuous Year and Curreny Year. the report then shows dollar difference and % change by quarter. However, when I set this up in a matrix, the output looks like:

 Q1   Q2   Q3   Q4   
 PY RevCY Rev$ ▲% ▲PY RevCY Rev$ ▲% ▲PY RevCY Rev$ ▲% ▲PY RevCY Rev$ ▲% ▲
McDonalds                
Wendy's                

 

I want the report to be set up like this:

 Q1Q2Q3Q4Q1Q2Q3Q4Q1Q2Q3Q4Q1Q2Q3Q4
 PY RevPY RevPY RevPY RevCY RevCY RevCY RevCY Rev$ ▲ Q/Q$ ▲ Q/Q$ ▲ Q/Q$ ▲ Q/Q% ▲ Q/Q% ▲ Q/Q% ▲ Q/Q% ▲ Q/Q
McDonalds                
Wendy's                

 

Is there a way to reorder columns in Power BI, or does anyone have suggestions on how to present this report? Thanks!

 

1 REPLY 1
whitch
Resolver I
Resolver I

Use 'Enter data' to create a little 4-row 2-column table.  Call the table 'tblColumns':

Col_Name    Order

CY Rev         1

PY Rev         2

$ Q/Q          3

% Q/Q         4

Once created, click on [Col_Name] and a 'Column Tools' tab should appear in the ribbon.  Use 'Sort by column' to sort [Col_Name] by [Order]

Ensure this little table is NOT linked to anything in modelling view.

Create the following measure:

 

tableVales = if(SELECTEDVALUE(tblColumns[Col_Name]) = "CY Rev", [CY Rev],if(SELECTEDVALUE(tblColumns[Col_Name]) = "PY Rev", [PY Rev],if(SELECTEDVALUE(tblColumns[Col_Name]) = "$ Q/Q", [$ Q/Q],if(SELECTEDVALUE(tblColumns[Col_Name]) = "% Q/Q", [% Q/Q],0))))
 
I have assumed you already have [CY Rev], [PY Rev], [$ Q/Q], and [% Q/Q] measures from your previous work (or, if not, they can easily be made).
 
Create a matrix visual. [Business] goes in rows, [Col_Name] then [Quarter] in columns, [tableValues] in values.
 
I realise some things are confusingly named, but what else do I call a table which lists names of measures?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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