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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ash1807
New Member

Difference between 2 matrix

I have created 2 matrix from a table which shows stock on hand on a particular date. For date selection i have used 2 date slicers and have applied edit interaction so that 1st slicer is associated with 1st matrix and 2nd is associated with 2nd mateix. I wanna have a 3rd matrix which shows difference in stock between previous 2 matrix. How to do that?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Ash1807 ,

Please have a try.

You can create a third matrix that shows the difference in stock between the previous two matrices by using the "New Measure" option. You can create a measure that subtracts the value of the first matrix from the value of the second matrix. You can then add this measure to the third matrix.

Difference =
SUM ( Table[StockOnHand] )
    - CALCULATE ( SUM ( Table[StockOnHand] ), ALLSELECTED () )

This formula calculates the difference between the sum of the "StockOnHand" column for the entire table and the sum of the "StockOnHand" column for the selected dates. You can then add this measure to the third matrix.

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Ash1807 ,

Please have a try.

You can create a third matrix that shows the difference in stock between the previous two matrices by using the "New Measure" option. You can create a measure that subtracts the value of the first matrix from the value of the second matrix. You can then add this measure to the third matrix.

Difference =
SUM ( Table[StockOnHand] )
    - CALCULATE ( SUM ( Table[StockOnHand] ), ALLSELECTED () )

This formula calculates the difference between the sum of the "StockOnHand" column for the entire table and the sum of the "StockOnHand" column for the selected dates. You can then add this measure to the third matrix.

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.