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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jonnyA
Responsive Resident
Responsive Resident

My Total is not summing correctly

I cant get my total to sum correctly for Total Patients.  The total should be 4075, but Power BI is showing 4073.

Here are some of the measurse I am using ...

Patients = DISTINCTCOUNT(Charge_Dataset[Patient_Name]) 

 

Patients Qtr 1 = CALCULATE ( ( Charge_Dataset[Patients] ), FILTER ( '_Charge_Dataset', Quarter(_Charge_Dataset[DOS])= 1 )) So I created 3 more measures similar to the one above tweaking the quarter, so the Quarter 2 measure looked like this ... Patients Qtr 2 = CALCULATE ( ( _Charge_Dataset[Patients] ), FILTER ( 'Charge_Dataset', Quarter(GNP_Charge_Dataset[DOS])= 2 )) Then I did the same thing for Quarter 3 and Quarter 4 Then I created a quick measure that added Quarter 1 and Quarter 2 Then I created another measure that added Quarter 3 and Quarter 4 Finally, I crteated a measure the added the 2 above together which looks like this ... Total Patients = [Patients Qtr 1 plus Patients Qtr 2] + [Patients Qtr 3 plus Patients Qtr 4]+0 But as you can see form my screenshot the Total is off by 2. ASny advice on how to get the total to sum correctly?  Maybe there is a work-around?  

PBI 3.8.21.PNG

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Create a Calendar Table and write calculated column formulas to extract Year, Month name, Month number and Quarter.  Sort the Month name by the Month number.  Create a relationship from the date column of the _charge_dataset to the Date column of the Calendar Table.  To your matrix visual, drag Year, Quarter and Month name from the Calendar Table.  Just drag your Patients measure to the visual. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I'm sorry, but I do not know how to do that.  

im looking for a measure to write to get the total to sum correctly !!

Thank you !

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

You probably have patients that were present in multiple quarters, specifically in Q2 and Q3.

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!

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