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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
COG1
Frequent Visitor

Specific Matrix Column order with Calculated measures

I have Location and Sales data which is Hierarchical and displayed in a matrix table for that reason (the countries group to continentes etc.). Simplified example below:

 

 Q1  Q2  
 ActualPlanDifferenceActualPlanDifference
France 699 762-63 489 552-63
Germany 440 507-67 463 515-51
UK 271 313-42 576 618-42

 

However i need to show it in the following format with the actual data by quarter, followed by the plan, followed by the calculations for the difference

 

 Actual Plan Difference 
 Q1Q2Q1Q2Q1Q2
France 699 489 762 552-63-63
Germany 440 463 507 515-67-51
UK 271 576 313 618-42-42

 

 

How i can force the column order to represent table 2, and how i can calculate the difference fields and add them at the end as additional columns (e.g. $ difference and % difference of filtered).

 

Below is the dataset in original format for testing:

RegionCountryProductQuarter sales 
EuropeFranceElectricQ1              97
EuropeFranceElectricQ2              47
EuropeFranceElectricQ3              29
EuropeFranceElectricQ4              18
EuropeFranceICEQ1              41
EuropeFranceICEQ2              43
EuropeFranceICEQ3              12
EuropeFranceICEQ4              48
EuropeGermanyElectricQ1              71
EuropeGermanyElectricQ2              12
EuropeGermanyElectricQ3              47
EuropeGermanyElectricQ4              18
EuropeGermanyICEQ1              27
EuropeGermanyICEQ2                6
EuropeGermanyICEQ3              93
EuropeGermanyICEQ4              88
EuropeUKElectricQ1              28
EuropeUKElectricQ2              51
EuropeUKElectricQ3              78
EuropeUKElectricQ4                2
EuropeUKICEQ1              13
EuropeUKICEQ2              84
EuropeUKICEQ3                7
EuropeUKICEQ4              79
1 REPLY 1
COG1
Frequent Visitor

I think this could be an answer to defining the column order, but struggling to make the DAX work on my data. Any advice @Greg_Deckler ?

 

The New Hotness (Custom Matrix Hierarchy) - Page 2 - Microsoft Power BI Community

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.