Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am trying to create a report to reconcile charges with payments. This is a healthcare environment that generates 2-3 charges for each claim, depending on the number of insurances. Unfortunately, the billing system does not assign a unique charge number or indicate who the charge is going to. Here is an example:
Claim Name Amount
12345 | John Smith | 250 |
12345 | John Smith | 250 |
12345 | John Smith | 250 |
45678 | Bob Jones | 300 |
45678 | Bob Jones | 300 |
45678 | Bob Jones | 300 |
In this example, each patient has a Primary Insurance, a Secondary Insurance, and a Co-pay. Each row represents a claim to each of those payment sources.
On the payment side, I need to reconcile how many payments have been received and if there is an outstanding balance
Claim Name Payment
12345 | John Smith | 100 |
12345 | John Smith | 100 |
12345 | John Smith | 40 |
45678 | Bob Jones | 100 |
45678 | Bob Jones | 100 |
Using this sample data, John Smith/12345 has an outstanding balance of $10, while Bob Jones/45678 has an outstanding balance of $100.
I would like my final table to look something like this:
Thank you in advance for any advice
Solved! Go to Solution.
Hey @aflintdepm ,
You will need some DAX measures and a correct data model. See the attached pbix example.
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Hey @aflintdepm ,
You will need some DAX measures and a correct data model. See the attached pbix example.
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Thank you for the example file- this was very helpful. I just have a couple of questions
First- am I correct in my understanding that you created the third table to remove the duplicates and give a single lookup table?
Second- could you please explain the structure of the Charge measure you created? I don't understand the nested CALCULATE(VALUES without a filter expression)
Hey @aflintdepm !
1. Yes. I put the data into a star schema model perspective
2. The CALCULATE
function changes the context of the calculation. Inside the CALCULATE
, we use VALUES(Charge[Claim])
to get a table with the unique values of the "Claim" column. The absence of a filter expression in CALCULATE
means it operates in the current filter context established by the outer SUMX
.
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
70 | |
55 | |
37 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |