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

Calculate Difference between percentages in two matrixes

I am trying to create a matrix that will display the difference of two different matrix that I have already created.  Below is a visual of the two tables I have so far. I have multiple employees, who will each be working on different labor types for varying amounts of hours.  Columns A - C is the planned data, and F- H is what actuall happened. 

 

 PowerBIExampleData.PNG

 

I have already taken the data above and created the first three matrices that I have recreated with the above data.  I have also made the first two on the bottom row by using the same matrices and showing them as a percent of row total and excluding labor type 3.  I am now struggling to create the third matrix in the bottom row.  This formula should subtract the data that is in the other two matrices in the same row to get the variance.

 

Group of Matrices.PNG

 

Is there a way that I can calculate the variance between the two matrices? Or would it be better to create formulas to calculate the percentages in the Plan Percentage and Actuals Percentage matrices and then subtract those? Any help would be appreciated.

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @AM_VRSResearch ,

 

You need a bridge table.

Table = VALUES('Actuals'[Employee])

Relationships.

vcgaomsft_0-1651561766595.png

Then create and use these two measures.

Measure = [Actuals_1]-[Plan_1]
Measure 2 = [Actuals_2]-[Plan_2]

vcgaomsft_1-1651561918127.png

Attached PBIX file for reference.

 

Best Regards,
Community Support Team Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @AM_VRSResearch ,

 

You need a bridge table.

Table = VALUES('Actuals'[Employee])

Relationships.

vcgaomsft_0-1651561766595.png

Then create and use these two measures.

Measure = [Actuals_1]-[Plan_1]
Measure 2 = [Actuals_2]-[Plan_2]

vcgaomsft_1-1651561918127.png

Attached PBIX file for reference.

 

Best Regards,
Community Support Team Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

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.