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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
christinas
Helper I
Helper I

Subtracting from two difference tables

Hello. Thank you for your help in advance. I have two tables with the same columns on it for both; one is data for 2024 and one is for 2025. I am trying to find what information has changed between years based on the Job family (HR, IT, Sales, etc) and Job Level (IC, Mid Management, etc). For HR in 2024, the number of Individual Contributors (IC) was 106 but for 2025 it is 96. I have two measures, one for each year, to count the total number of records. 

Issue 1 - When I try and add either measure to the other years chart, it gives me the total and does not split it out to show the total by level; it gives the total for all levels. ex: if I add the measure from 2024 to the 2025 matrix table, it will show HR has 136 IC when it should say only 106.

Issue 2 - I would like to show the total difference between the levels. I created a measure to do this but it subractes the 2025 HR's IC by the total of 66 by the total for the 2024 HR of 136, not 106.

Below is the measure I created to fix issue 2.

Level Diff =
VAR LevelCount2024 = [Level Count 2024]
VAR LevelCount2025 = [Level Count 2025]
VAR ItemsWithDifference =
    ADDCOLUMNS(
        VALUES('2025 Employee Engagement'),
        "@LevelDifference", [Level Count 2024] - [Level Count 2025])
VAR CountedRows =
    COUNTROWS(ItemsWithDifference)
RETURN
    CountedRows
Level Difference Issue.PNG
Any help is much appreciated. Thank you. 
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@christinas 

here is suggestion:

1. I think you need to create some dim tables (e.g. job family name table ) and connect dim table to these two fact tables.  Then in the matrix visual, the job family info should comes from the dim table.

 

2. Since you mentioned the tables with same columns. You can append tables in the power query

https://learn.microsoft.com/bs-latn-ba/power-query/append-queries?wt.mc_id=DP-MVP-5004616

 

or do it by using DAX

 

https://learn.microsoft.com/en-us/dax/union-function-dax?wt.mc_id=DP-MVP-5004616

 

If these two approahes still does not work for you, pls provide some sample data and expected output.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@christinas 

here is suggestion:

1. I think you need to create some dim tables (e.g. job family name table ) and connect dim table to these two fact tables.  Then in the matrix visual, the job family info should comes from the dim table.

 

2. Since you mentioned the tables with same columns. You can append tables in the power query

https://learn.microsoft.com/bs-latn-ba/power-query/append-queries?wt.mc_id=DP-MVP-5004616

 

or do it by using DAX

 

https://learn.microsoft.com/en-us/dax/union-function-dax?wt.mc_id=DP-MVP-5004616

 

If these two approahes still does not work for you, pls provide some sample data and expected output.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you, @ryan_mayu . I think that may work.

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file or share some dummy data to work with.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.