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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher 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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.