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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
bvandyke
New Member

Adding Calculated Column to Matrix - based on Column values

I'm pretty sure this is possible just not sure which way to approach it.  I need to add an Untiliztion value to a matrix.  The value is based on the values in the matrix columns (see sample below).  I figure I need to create calculated field for this but really don't know how to make that dependant on the column values.

 

Trying to add teh sbovhUltil column which is = (sbu/ovh column ) / sum (all three columns)
Appreciate the help!

Nameovh/ovhsbu/ovhsbu/projectsbuovdUltil 
John Smith 1553283%=155/sum of all three rows
Jill Smith28.5154 84%=154/sum of all three row

 

1 ACCEPTED SOLUTION
cengizhanarslan
Super User
Super User

Here you go:

OVH_OVH =
SUM ( Data[ovh/ovh] )

SBU_OVH =
SUM ( Data[sbu/ovh] )

SBU_PROJECT =
SUM ( Data[sbu/project] )

SBU OVD Util =
VAR Numerator =
    [SBU_OVH]
VAR Denominator =
    [OVH_OVH] + [SBU_OVH] + [SBU_PROJECT]
RETURN
DIVIDE ( Numerator, Denominator )

 

Matrix visual:

  • Rows → Name

  • Values →

    • OVH_OVH

    • SBU_OVH

    • SBU_PROJECT

    • SBU OVD Util (the measure above)

Format SBU OVD Util as Percentage.

 

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

View solution in original post

6 REPLIES 6
v-achippa
Community Support
Community Support

Hi @bvandyke,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @rajendraongole1 and @cengizhanarslan for the prompt response. 

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @bvandyke,

 

We wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

cengizhanarslan
Super User
Super User

Here you go:

OVH_OVH =
SUM ( Data[ovh/ovh] )

SBU_OVH =
SUM ( Data[sbu/ovh] )

SBU_PROJECT =
SUM ( Data[sbu/project] )

SBU OVD Util =
VAR Numerator =
    [SBU_OVH]
VAR Denominator =
    [OVH_OVH] + [SBU_OVH] + [SBU_PROJECT]
RETURN
DIVIDE ( Numerator, Denominator )

 

Matrix visual:

  • Rows → Name

  • Values →

    • OVH_OVH

    • SBU_OVH

    • SBU_PROJECT

    • SBU OVD Util (the measure above)

Format SBU OVD Util as Percentage.

 

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.
bvandyke
New Member

Ok, I put this in and think I understand it.  But, getting error "sbu/ovh" cannot be determined.  "sbu/ovh" is one of the values in a field (LaborCat) that is set as the Column for the matrix (LaborCat is the column for the matrix).  
How do I tell the measure to reference that?

Thanks

Spoiler
Hi @bvandyke - you can create a base measure

Total Hour = SUM( Labor[Hours] )

Now create another mesure for utilización

sbuovhdUtil =
VAR SBU_OVH =
CALCULATE (
[Total Hours],
Labor[LaborCat] = "sbu/ovh"
)

VAR Total_All =
CALCULATE (
[Total Hours],
Labor[LaborCat] IN { "ovh/ovh", "sbu/ovh", "sbu/project" }
)

RETURN
DIVIDE ( SBU_OVH, Total_All )

 

 

This should be works.

Check and confirm.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





rajendraongole1
Super User
Super User

Hi @bvandyke  - If the value depends on what’s shown in the matrix, it must be a measure.
Never a calculated column.

Measure:

sbuovhdUtil =
VAR SBU_OVH =
[sbu/ovh]

VAR Total =
COALESCE([ovh/ovh], 0)
+ COALESCE([sbu/ovh], 0)
+ COALESCE([sbu/project], 0)

RETURN
DIVIDE(SBU_OVH, Total)

 

Hope this helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.