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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
KarHut
Frequent Visitor

Need my Denominator to include more records than my Join can see

Hello Community --

I work with medical claims data, and a key metric is "Amount Paid Per Member Per Month."

* The numerator is the total dollars paid (in a given period, like Jan thru Mar).

* The denominator is total member months (total member months Jan thru Mar = members in Jan + members in Feb + members in Mar).

 

I have two key datasets:

* tbl_Enrollment

* tbl_Claims

 

I've had to generalize and randomize it quite a bit, but here's an .XLSX file with sample data.

https://drive.google.com/file/d/15ozRHA9UYWCGuv1BlOd1CnrdKikziUjd/view?usp=sharing

(In my actual data files, I have about 660 rows in tbl_Enrollment, and 26 million rows in tbl_Claims.)

 

I have a unique key in tbl_Enrollment, and a key of the same values in tbl_Claims. The join/relationship is Many to One, Cross filter direction = Both.

 

Here's the trouble: I need to get the numerator from the Claims table, and the denominator from the Enrollment table. But not every Enrollment group has a claim in every category every month. So when my visual filters for Group "Charlie" in YrMo "201908" with Category "X" and no claims records meet all the criteria, it does not include the Members for that month in the Sum of Member_Count. I need to include all the appropriate Member_Counts even when the join doesn't return any Claims.

 

The correct denominator values in this SAMPLE data set look like this:

Enr totals.png

 

But when I show the sum of Paid_Amt (from Claims) and sum of Member_Count (from Enrollment), the Member_Count values are limited to the records found in the table join. What I want to see is: for 2019, Alpha had 30025 members (regardless of the Claims category).

 

PMPM wrong.png

 

The column Paid_PMPM is a simple measure:

Paid_PMPM = SUM(tbl_Claims[Paid_Amt])/SUM(tbl_Enrollment[Member_Count])

 

But they are not correct, because the Sum of Member Count values are missing Enrollment records that need to be included.

 

I hope I haven't gone off the rails here! Please ask questions if I need to clarify anything. I sure appreciate any help.

5 REPLIES 5
Anonymous
Not applicable

Hi @KarHut ,

 

My understanding is that you want to sum all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. If my understanding is correct, please try to use the ALL function.

 

Here's a simple sample.

17.png

 

Without ALL function = SUM('Table'[Value])

 

18.png

 

With ALL function = CALCULATE(SUM('Table'[Value]),ALL('Table'))

 

19.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

KarHut
Frequent Visitor

Hi @amitchandak -- thanks so much for your kind reply. It's my first post in this forum.


Is this the best way to share files here? It's a link to my sample PBIX document.

https://drive.google.com/file/d/1-YxlPtv8SR2BwqJxkWYHxxa0LtsIUVSE/view?usp=sharing


In my original post I included a link to an Excel data file with my two tables. (I tried to limit my 26M row data file to an 80 row X 20 column sample, but it still seemed too big for a table in the post. If an in-post table is better, I'd be happy to do that.)


I may not have said this earlier, but I also need to be able to filter the data by the various other dimensions in the Claims table. Some are hierarchical, like Category 1 and 2. When any of them are included in the visual, they reduce the number of joined Enrollment records and return a reduced Member Count sum.


Here are the correct, high-level Enrollment totals in a table. (I'm having a really hard time with table formatting in these posts.)

Sum of Member_Count Year 
LOBBus_Group20192020
Commercial GroupAlpha3002522032
Commercial GroupBravo3861832776
Commercial GroupCharlie211298161742
Commercial Group Total 279941216550
IndividualDelta3712526214
IndividualEcho154194118856
IndividualFoxtrot90426972
Individual Total 200361152042


Here's a sample output for Alpha group in 2019, with wrong Member Count values from PowerBI, and the values I want to get:

LOBBus_GroupCateg_1Sum of Paid_Amt (2019)Sum of Member_Count (2019)CORRECT Member_CountCORRECT Paid PMPM
Commercial GroupAlphaInstitutional Rad/Lab  300250
Commercial GroupAlphaOther OP$496.9018006300250.0165
Commercial GroupAlphaOther Primary Care$83.605833300250.0028
Commercial GroupAlphaOther Prof Services  300250
Commercial GroupAlphaOV - PCP  300250
Commercial GroupAlphaProf Rad/Lab$143.506186300250.0048
Commercial GroupAlphaSurgery - Hospital$99.905833300250.0033


Thanks again!

AlB
Community Champion
Community Champion

Hi @KarHut 

Why don't you share the pbix you've built with the mock data, instead of the loose tables in the excel file?? That would save us time and the guesswork and it seems you already have built it since you are showing the visuals.

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

 

amitchandak
Super User
Super User

@KarHut ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

Hello. Giving this a bump, to ask if the PBIX file and info I added is helpful. Thanks.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.