Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hello once again.
I am currently working on a database involving departments and subdepartments. What I am trying to do is to have all departments branched out and would like to input the following measure. I want to be able to see the % of the subdepartment within the department. For example,
Whole costs are 100 units and Departament A represents 5 units. Additionally Department A has subdepartments and I would like to know the weight of such subdepartment regarding the Department A. Because right now what I am able to do is to see given percentage but from the sum of the whole Departments,
Thank you for your time,
Thank you for the swift reply. I will try to implement it as soon as I can I just have a question regarding the "//". I'm not sure what that is.
Hi again Shakwell
// are comments. I recommend that add comments to measure to document them and assist your learning.
Please click thumbs up and accept as solution buttons. Thanks
Create this measure
Unitpercent =
// get units for sub department
VAR mysubdepartmentunits =
SUM(yourtable[units])
// get units for department
VAR mydepartmentunits =
CALCULATE(
SUM(yourtable[units],
ALLEXCEPT[Department]
)
RETURN
DIVIDE(
mysubdepartmentunits ,
mydepartmentunits
)
Format unitpercent as a %
Create a visual table with
Department, Subdepartment, units and unitpercent
Please click thumbs up and accept as solution buttons. Thanks 😀
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!