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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
minimumlives
New Member

Cost Per Unit Won't Drill Down to Account-Level in a Matrix

Hi, I am calculating a cost per unit, which was easily done using a basic measure. However, I've been requested to add a drill down to the Cost Per Unit at the account level, and instead of displaying properly, the drill down seems to show all data, and not on a per unit basis.

 

Here is the data:

CompanyNameAcctDescrCategoryValue
APaintMaint45396
AFloorsMaint4000
ACarpetMaint6000
AUnit CountUnits200
BPaintMaint54880
BFloorsMaint4000
BCarpetMaint1000
BUnit CountUnits400
CPaintMaint67996
CFloorsMaint4000
CCarpetMaint700
CUnit CountUnits500

 

Here is what I'm hoping to show in a PBI table or matrix: a total and a drill down to the cost account level.

 

minimumlives_2-1646522043464.png

 

Thanks!

 

 

 

 

1 ACCEPTED SOLUTION
littlemojopuppy
Community Champion
Community Champion

Hi @minimumlives 

 

The problem is that you have two different things in your data: costs and units.  You need to split them into separate tables to get this to work correctly.

 

The attached Excel file has your solution.  The DAX for cost/unit is simply

Cost / Unit:=
DIVIDE(
	SUM(RawData[Value]),
	SUM(Companies[Units]),
	BLANK()
)

 

Here's the results

littlemojopuppy_0-1646524925302.png

Hope this helps!

View solution in original post

3 REPLIES 3
littlemojopuppy
Community Champion
Community Champion

Hi @minimumlives 

 

The problem is that you have two different things in your data: costs and units.  You need to split them into separate tables to get this to work correctly.

 

The attached Excel file has your solution.  The DAX for cost/unit is simply

Cost / Unit:=
DIVIDE(
	SUM(RawData[Value]),
	SUM(Companies[Units]),
	BLANK()
)

 

Here's the results

littlemojopuppy_0-1646524925302.png

Hope this helps!

It works. Thank you so much.  

@minimumlives you're welcome.  Glad I could help!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors