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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.