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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jonnyA
Responsive Resident
Responsive Resident

Totals are not summing correctly

Hello,

I dont know why my Totals are summing correctly?  Anyone have any advice on how I can make them sum correctly?

jonnyA_0-1631547230170.png

 

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Alexis has a valid point.  However, if you still want to add the entries in the column, then share the link from where i can download your PBI file.

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yiruan-msft
Community Support
Community Support

Hi @jonnyA,

You can create two measures([Measure1] and [Measure2]) as below and put the measure [Measure2] on the matrix. Please note that replace the table name "Table" referenced in the following formula with the actual table name you applied to the matrix.

Measure1 = DISTINCTCOUNT ( 'Table'[CPT'S] )
Measure2 =
SUMX (
    GROUPBY ( 'Table', 'Table'[Provider Name], 'Table'[CPT Code] ),
    [Measure1]
)

In addition, you can refer the method in the following links to resolve it.

Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand

Dax for Power BI: Fixing Incorrect Measure Totals

If the above one can't help you get the correct result, please provide some simple sample data of involved fields in your matrix and correct result with screenshot or table. By the way, are these fields from the same table? If no, is there relationship created between these tables? Please also provide the relationship information if any relationship be created. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlexisOlson
Super User
Super User

A distinct count is not necessarily additive. If you have the same [CPT's] under multiple different [CPT Codes], then do you actually want to count them multiple times in your total?

Greg_Deckler
Super User
Super User

@jonnyA 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


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.