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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
DanaElaine
Frequent Visitor

Subtracting columns in two tables with filter where one needs to be grouped

I have two related tables with information about how groups spent their budget. The groups can use two different payment methods.

  • Table A has one row per group with the absolute total spent. 
  • Table B has one row per order per group when the group paid using payment method one. 

I'm trying to find the amount that each group spent using the other payment method.

 

If both tables had one row per group, I believe I could use a measure like this: Other_Total = SUMX('TableA', 'TableA'[TotalBudgetUsed]) - SUMX('TableB', 'TableB'[OrderTotal])

However, most groups have multiple orders. 

 

Any suggestions? Thanks in advance!

1 REPLY 1
Anonymous
Not applicable

Hi @DanaElaine ,

Is there any relationship created between 'Table A' and 'Table B'? If yes, what's the base field? Could you please provide some raw data in the table 'Table A' and 'Table B' (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.