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

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.

Reply
Anonymous
Not applicable

sum if row header matches in measure

Hi Experts,

 

I need to sum the value and show it to only on row headers.

 

below is my example data.

 

Swamy3105_0-1653555798922.png

 

Swamy3105_0-1653555728956.png

Need to create measure and if row header matches then sum the unique value and display.

 

Pls help me on this.

 

Regards.,

Swamy

1 ACCEPTED SOLUTION

Hi, @Anonymous 

Please add another measure formulas as below:

 

Result = If(ISINSCOPE('Table'[Cost_Center_Code]),0,[M_C&R])

veasonfmsft_0-1653986252997.png

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

5 REPLIES 5
Fowmy
Super User
Super User

@Anonymous 

Check the following measure:

Total = SUMX( VALUES( Table[C%R] ) , [C%R] )





Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

amitchandak
Super User
Super User

@Anonymous , Not very clear you can get subtotal using

 

calculate([Meausre], removefilters(Table[Cost center code]))

 

calculate([Meausre], filter(allselected(Table) ,[business] = max(Table[Business])) )

 

 

you can use isinscope to control

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

 

or

 

 

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

@amitchandak 

I just want to show total value to the row headers only which is "Crude", and the cost center values should be 0.

 

Swamy3105_0-1653556616368.png

 

Regards.,

Swamy

Anonymous
Not applicable

Hi Experts,

 

any idea ?

 

Regards.,

Swamy

Hi, @Anonymous 

Please add another measure formulas as below:

 

Result = If(ISINSCOPE('Table'[Cost_Center_Code]),0,[M_C&R])

veasonfmsft_0-1653986252997.png

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.