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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SamT87
New Member

Measure for powerpivot to create average of utilization of total population of different field

Hi All - 

 

I am hoping someone can help me with a question rather quickly.  

 

I'm trying to calculate the average of the Sum of "Total Units" in an entire population.  My current measure formula is only displaying the average of total units of the total population at the CPT Code level opposed to the average units of the CPT Code at the entire population level (field "Claim Number"). 

 

The challenge that exists is there could be "Claim Numbers" that do not contain specific CPTs.  However, I want the calculation of the "average units" of the CPT utilization to take into account the ENTIRE population so the average is representative of the entire population.  I'm not well versed at editing tables outside of excel, so my preference is to use a measure formula.  However, if this cannot be achieved be creating a powerpivot measure I am open to trying to trying something through the "manage" Data Model.  The other option is to paste all CPTs for all claim numbers with a unit frequency of zero, but that would not be efficient for future updates and also likely get into the millions of rows scenarios.

 

Current Measure Formula

'=DIVIDE(Sum('Range 1'[Units Billed]),DISTINCTCOUNT('Range 1'[Claim Number]))

 

Example current output (incorrect as it is only calculating the average utilization of the total of CPT units (97530) 

SamT87_2-1699370990041.png

Example Pivot Structure

SamT87_0-1699370840807.png

 

Appreciate the help and consideration!

 

Thank you,

Sam

1 ACCEPTED SOLUTION
SamT87
New Member

Switched to Power BI and learned how to do a calculate function. Problem solved, boom!

 

Avg Units = divide(sum('Detailed Data CPT AND CHARGE'[Units Billed]),CALCULATE(DISTINCTCOUNT('Detailed Data CPT AND CHARGE'[Claim Number]),ALL('Detailed Data CPT AND CHARGE'[CPT Code])))

View solution in original post

2 REPLIES 2
SamT87
New Member

Switched to Power BI and learned how to do a calculate function. Problem solved, boom!

 

Avg Units = divide(sum('Detailed Data CPT AND CHARGE'[Units Billed]),CALCULATE(DISTINCTCOUNT('Detailed Data CPT AND CHARGE'[Claim Number]),ALL('Detailed Data CPT AND CHARGE'[CPT Code])))
SamT87
New Member

😞

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors