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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.