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

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

Reply
Anonymous
Not applicable

Need help on calculating sum of the calculated measure.

Hi, if there is a power bi pro, please help me.

I'm trying to get the sum of the calculated measure that only shows 1 or 0.

YearCustomerTotal UnitRetention

2015

1062200
20161062211
20171062211
20181062211
Total 31

This is what my table in the Power bi shows. I want to get another measure or retention to be calculate the sum of the retention for each customer. For example, the total row retention column should show 3 instead of 3. Can someone help me on this problem?

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You could try the following measure:

Measure = 
CALCULATE (
    SUM(  'Table'[Total Unit] ),
    ALLSELECTED( 'Table'[Total Unit] )
)

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

5 REPLIES 5
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use the following measure.

Measure =
CALCULATE (
    MAX ( 'Table'[Total Unit] ),
    FILTER ( 'Table', 'Table'[Year] = MAX ( 'Table'[Year] ) )
)

Here is the result.

2-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

This is what I have right now. I want a new measure or the measure on the table to show the total with right calculation. Yours shows the total for measure is still 1 I want it to be 3.

Hi @Anonymous ,

 

Does that make sense? If so kindly mark my answer as a solution to close the case. Thanks in advance.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @Anonymous ,

 

You could try the following measure:

Measure = 
CALCULATE (
    SUM(  'Table'[Total Unit] ),
    ALLSELECTED( 'Table'[Total Unit] )
)

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Greg_Deckler
Community Champion
Community Champion

@Anonymous - Not sure I understand but this looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors