Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello!
I am trying to aggregate and count patients based on their claims spend.
Here is a sample table:
patient_id Medical Rx
ABC123 $50,000 $10,000
DEF123 $25,000 $5,000
HIJ123 $10,000 $1,000
I then created a Total Spend measure: Total Spend: calculate(sum(Patient[medical)+calculate(sum(Patient[Rx). This yields a result for Patient ABC123 of $60,000, DEF123 $30,000, and HIJ123 $11,000.
I'm good up to this point.
Lastly, I created a table that is being used as a filter to give me claim spend ranges:
claim_range
$10,000
$20,000
$30,000
$40,000
$50,000
$60,000
$70,000
$80,000
$90,000
$100,000
Lastly, I created a measure based on the selected claim_ranges above: Claim Range: calculate(average(Claim[claim_range])
This is used as a filter to adjust the formulas below.
#1: First formula seems to work just fine
Solved! Go to Solution.
Hi @novotnajk ,
Check the formulas.
Claim Range = calculate(average(Claim[claim_range]))
Claim Range 50% = [Claim Range]*.50
High Cost Patients = CALCULATE(DISTINCTCOUNT(Patient[patient_id]),FILTER(Patient,Patient[Total Spend]>=Claim[Claim Range]))
High Cost Patients 50% = CALCULATE(DISTINCTCOUNT(Patient[patient_id]),FILTER(Patient,Patient[Total Spend]>=Claim[Claim Range 50%]&&Patient[Total Spend]<Claim[Claim Range]))
Best Regards,
Jay
Hi @novotnajk ,
Check the formulas.
Claim Range = calculate(average(Claim[claim_range]))
Claim Range 50% = [Claim Range]*.50
High Cost Patients = CALCULATE(DISTINCTCOUNT(Patient[patient_id]),FILTER(Patient,Patient[Total Spend]>=Claim[Claim Range]))
High Cost Patients 50% = CALCULATE(DISTINCTCOUNT(Patient[patient_id]),FILTER(Patient,Patient[Total Spend]>=Claim[Claim Range 50%]&&Patient[Total Spend]<Claim[Claim Range]))
Best Regards,
Jay
Hi Ashish,
I was hoping to avoid another filter (proportion). If there a way to build the proportion you've highlighted above into a measure?
Hi,
The input of 50% or 40% has to be a user input - that's why i built that table manually.
Sorry, meant patients, not employees.
Hi,
You may download my PBI file from here. The table on the right will show you the customers who spent between 30,000 and 60,000. From the third table, if you wish, you may remove the Patient_ID field.
Hope this helps.