Forum Discussion
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?
4 Replies
- lbendlin
Super User
You probably have patients that were present in multiple quarters, specifically in Q2 and Q3.
- Ashish_Mathur
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.
- jonnyA
Responsive Resident
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 !
- Ashish_Mathur
Super User
Hi,
Share the link from where i can download your PBI file.