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 August 31st. Request your voucher.

Reply
shep123
Helper I
Helper I

How to include adjustment in subtotal measure

I have 2 tables, 1 dimension table that has a view of all the products and a fact table that has all the products and their targets. We intentionally set higher product targets than our overall goal. In the example below our company target is 200 but the sum of the individual products is actually 225, hence the -25 Prod Adjustment.

 

Dimension

ProductCountry
Prod AUS
Prod BUS
Prod CUS

 

Fact

ProductTarget
Prod A100
Prod B50
Prod C75
Prod Adjustment-25

 

When making a matrix the grand total aggregates properly but not the subtotal. I want the US row to also say 200. There are no other Countries besides US. We just use that for a top level of the hierarchy.

CountryTargets (Actual)
US225
    Prod A100
    Prod B50
    Prod C75
Total200

 

My current measures are in the attached file if that is helpful. The source of the issue is that [US Target] equals 225 and not 200. I don't know if I am on the right path for best way to accomplish this though. I also use a many to many relationship even though it is not necessary in the example because it is required in our actual workbook.

 

https://www.dropbox.com/s/kabeww42exurqri/Target%20Adjustment%20Sample.pbix?dl=0 

 

Thanks

2 REPLIES 2
shep123
Helper I
Helper I

I think there is some confusion because that doesn't accomplish what I need. I have to have a many-many relationship because this is only a subset and the actual relationship is many-many. Also, I have to account for the -25 in the US subtotal and not just the grand total and not utilize a blank row.

That is why my measures are as follows:
US Target = CALCULATE(SUM('Product Targets'[Target]), ALL(Products[Product]))

 
Targets (Actual) =
VAR us_target = [US Target]
VAR prod_target = 'Product Targets'[Prod Target]
RETURN IF(SELECTEDVALUE(Products[Product]) IN {"Prod A", "Prod B", "Prod C"}, prod_target, us_target).
 
I want that US Target column to say 200 for every row so I can then use it in my Targets (Actual) formula
amitchandak
Super User
Super User

@shep123 , Your relation was many to many. I made it 1 to many and now it shows the blank row.

Please find the file attached after signature

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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