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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bwhiteaccess
New Member

Count the relationships

I need to figure out the number of patients I have with different benefit plans and which or primary, secondary or tertiary.  I have the following columns

Benefit Plan Name, Patient and Benefit Plan Priority.

I am new to Power BI so this might be simple but I appreciate your help.

 

1 ACCEPTED SOLUTION

@bwhiteaccess 

maybe you can try this in PQ.

 

1. sort the benefit plan name column

 

2. create a new column to combine benefit name and priority column

 

=[Benefit Name] & " "&[Benefit Plan Priority]

 

11.png

 

3. group by

 

= Table.Group(#"Added Custom", {"patient name"}, {{"Benefit", each Text.Combine([Custom],","), type text}})

 

12.PNG

 

at last, you can use distinctcount or remove duplicates to  get the benefit combination amount.

 

pls see the attachment below

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
NaveenGandhi
Super User
Super User

@bwhiteaccess 

Can you provide sample data and expected output?

Regards,
NG

bwhiteaccess_0-1720459528213.png

We have about 250 different benefit plans.  Some patients have multiple plans, some being primary and others being secondary.

What I need to know is what combonations we have and how many there are.

Example - Joe S. has United Healthcare primary and Medicaid secondary.

Thanks

 

Thank you.

@bwhiteaccess 

maybe you can try this in PQ.

 

1. sort the benefit plan name column

 

2. create a new column to combine benefit name and priority column

 

=[Benefit Name] & " "&[Benefit Plan Priority]

 

11.png

 

3. group by

 

= Table.Group(#"Added Custom", {"patient name"}, {{"Benefit", each Text.Combine([Custom],","), type text}})

 

12.PNG

 

at last, you can use distinctcount or remove duplicates to  get the benefit combination amount.

 

pls see the attachment below

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello @bwhiteaccess , and thank you for sharing a question with the Community.  This reply is informational. Please follow the decorum of the Community Forum when asking a question.

Please share your work-in-progress Power BI Desktop file (with sensitive information removed) and any source files in Excel format that fully address your issue or question in a usable format (not as a screenshot). You can upload these files to a cloud storage service such as OneDrive, Google Drive, Dropbox, or to a Github repository, and then provide the file's URL.

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

 

If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.  Proud to be a Super User!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.