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
Anonymous
Not applicable

Division in Matrix for Hierarchy

Hello!

I have been trying to figure out how to get the division to work for matrix tables in Power BI. It works for the lower hierarchy level but not the higher level. Any suggestions would be much appreciated! See screenshot below. The higher level shows 100% while the lower level % is correct.

test screenshot.JPG

I realized that I can't upload a sample workbook so I'm pasting the tables and the calculations here.

 

Tables

Sheet1

CountryLocationBudgetLocation Expenses
USASeattle650600
USANY800790
USAChicago750600
USADallas550300
USAMiami600450
UKLondon650590
UKLiverpool600300
UKYork550250
CanadaVancouver650598
CanadaToronto680652
ChinaBeijing540325
ChinaShanghai600589

 

Budget

CountryLocationAward Value
USASeattle50
USANY60
USAChicago35
USADallas40
USAMiami36
UKLondon55
UKLiverpool25
UKYork15
CanadaVancouver80
CanadaToronto77
ChinaBeijing45
ChinaShanghai62

 

point adj

CountryLocationTypePoints
USASeattleLocation Transfer100
USASeattleLocation Holdback35
USASeattlePoint Addition25
USANYLocation Transfer200
USANYLocation Holdback50
USANYPoint Addition50
USANYPoint Addition10
USAChicagoPoint Addition25
USAChicagoLocation Holdback45
USADallasLocation Holdback100
USAMiamiLocation Transfer30
USAMiamiLocation Holdback50
UKLondonLocation Transfer25
UKLondonLocation Holdback30
UKLondonPoint Addition100
UKLiverpoolLocation Holdback45
UKYorkLocation Holdback75
CanadaVancouverPoint Addition100
CanadaVancouverLocation Holdback40
CanadaTorontoPoint Addition95
CanadaTorontoLocation Holdback50
ChinaBeijingLocation Transfer200
ChinaBeijingLocation Holdback25
ChinaShanghaiLocation Holdback100

 

Table relationships:

budget to Sheet1 through Location: one to one

point adj to Sheet1 through Location: Many to one

 

Calculations:

Location Holdback = CALCULATE(SUM('point adj'[Points]), FILTER('point adj','point adj'[Location] = SELECTEDVALUE(Sheet1[Location]) && 'point adj'[Type] = "Location Holdback"))
 
Point Adjustments = (CALCULATE(SUM('point adj'[Points]), FILTER('point adj', 'point adj'[Location] = SELECTEDVALUE(Sheet1[Location])), FILTER('point adj','point adj'[Type] = "Point Addition"))) + (CALCULATE(SUM('point adj'[Points]), FILTER('point adj', 'point adj'[Location] = SELECTEDVALUE(Sheet1[Location])), FILTER('point adj','point adj'[Type] = "Location Transfer")))
 
Budget after = SUM(Sheet1[Budget]) - [Location Holdback] + [Point Adjustments]
 
Points Spent = CALCULATE(-SUM(budget[Award Value]), FILTER(budget,budget[Location] = SELECTEDVALUE(Sheet1[Location])))
 
Points Remaining = [Budget after] + [Points Spent]
 
% = DIVIDE([Points Remaining], [Budget after], 0)
 
 
 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous, create measures like

 

Location Holdback = CALCULATE(SUM('point adj'[Points]), FILTER('point adj','point adj'[Type] = "Location Holdback"))

Point Adjustments = (CALCULATE(SUM('point adj'[Points]), FILTER('point adj', FILTER('point adj','point adj'[Type] = "Point Addition"))) + (CALCULATE(SUM('point adj'[Points]), FILTER('point adj','point adj'[Type] = "Location Transfer"))) )

Budget after = SUM(Sheet1[Budget]) - [Location Holdback] + [Point Adjustments]

Points Spent = -1* SUM(budget[Award Value])

Points Remaining = [Budget after] + [Points Spent]

% = DIVIDE([Points Remaining], [Budget after], 0)

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
Anonymous
Not applicable

Hi @amitchandak , thank you SO MUCH for responding to my post. Actually I just figured out that I should have used the column in the % calculation instead of the measure.

 

Thank you though! 

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.