The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I've been working on a dashboard for some time and still struggling getting the resuts of a created measure that I built and need.
I'm trying to find the sum of [Plan Payment Amount] for each distinct [Claim Serial Number]. Both [Plan Payment Amount] and [Claim Serial Number] are within the table 'Claim Data'. It's important to state that each [Claim Serial Number] can and often does populate numerous times.
I've already gone ahead and created the measures I need in order to find the sum of the total [Plan Payment Amount] for each [Claim Serial Number]. There are simplier ways to do this I'm sure but these are working so I have no issues here.
Solved! Go to Solution.
Hi @Anonymous
I build two sample tables as below to have a test.
Claim Data Table:
Claim Buckets Table:
Firstly, I calculate the total Plan Payment Amount by measure.
Total Plan Payment Amount = CALCULATE(SUM('Claim Data'[Plan Payment Amount]]]),FILTER(ALLSELECTED('Claim Data'),'Claim Data'[Claim Serial Number]=MAX('Claim Data'[Claim Serial Number])))
Result:
Then I use two measure to count the number of Claim Serial Number which is in the Bucket Range.
M_Claim Range = CALCULATE(MAX('Claim Buckets'[Claim Range]),FILTER('Claim Buckets',[Total Plan Payment Amount]>='Claim Buckets'[Claim Min]&&[Total Plan Payment Amount]<'Claim Buckets'[Claim Max]))
Count = CALCULATE(DISTINCTCOUNT('Claim Data'[Claim Serial Number]),FILTER('Claim Data',[M_Claim Range]=MAX('Claim Buckets'[Claim Range])))
Result:
You can download the pbix file form this link:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
I build two sample tables as below to have a test.
Claim Data Table:
Claim Buckets Table:
Firstly, I calculate the total Plan Payment Amount by measure.
Total Plan Payment Amount = CALCULATE(SUM('Claim Data'[Plan Payment Amount]]]),FILTER(ALLSELECTED('Claim Data'),'Claim Data'[Claim Serial Number]=MAX('Claim Data'[Claim Serial Number])))
Result:
Then I use two measure to count the number of Claim Serial Number which is in the Bucket Range.
M_Claim Range = CALCULATE(MAX('Claim Buckets'[Claim Range]),FILTER('Claim Buckets',[Total Plan Payment Amount]>='Claim Buckets'[Claim Min]&&[Total Plan Payment Amount]<'Claim Buckets'[Claim Max]))
Count = CALCULATE(DISTINCTCOUNT('Claim Data'[Claim Serial Number]),FILTER('Claim Data',[M_Claim Range]=MAX('Claim Buckets'[Claim Range])))
Result:
You can download the pbix file form this link:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much. This is perfect.
Bump for views
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
81 | |
57 | |
48 | |
48 |