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
randyrettig
Helper I
Helper I

AVG of two measure

Hi everyone,

 

I have two measures - one adds the total count of estimates and jobs and returns the number (Est + Jobs).  The other measure takes the total sell price of estimates and the total sale price of jobs, and adds them together (Est Price + Job Price).  

 

What I want to do is get the average sale price of all jobs, and I cannot figure out how to average these two measures.  Maybe because one is returning a count and the other is returning a sum?  Please help!

 

Randy

1 ACCEPTED SOLUTION
SmartSmith
Advocate I
Advocate I

To calculate the average sale price of all jobs using the two measures you've described, you'll need to use both measures in a specific way. Here's a general approach:

  • Use the First Measure (Est + Jobs): This measure gives you the total count of estimates and jobs. Let's call this TotalCount.
  • Use the Second Measure (Est Price + Job Price): This measure gives you the total sell price of estimates and jobs combined. Let's call this TotalPrice.
  • Calculate Average Sale Price:
    • If you want the average sale price across both estimates and jobs, you would divide the TotalPrice by the TotalCount. This gives you the average sale price per estimate/job.
    • Average Sale Price=TotalPriceTotalCount
    • Average Sale Price=
    • TotalCount
    • TotalPrice
    • However, if you specifically want the average sale price for jobs only, and assuming you have a way to separate the total sell price and count of jobs from estimates, you would use those specific totals. Let's say JobsCount is the total count of jobs and JobsPrice is the total sale price of jobs, then:
    • Average Job Sale Price=JobsPriceJobsCount
    • Average Job Sale Price=
    • JobsCount
    • JobsPrice
  • Implementation in a Data Analysis Tool: The exact method to implement this depends on the tool you're using (like SQL, Excel, a BI tool, etc.). You'll typically create a new measure or formula using the existing measures.
  • Considerations:
    • Ensure that the data types are compatible (e.g., both count and price should ideally be numeric).
    • Be mindful of how null values are handled in your dataset.
    • If the estimates and jobs are significantly different in nature, averaging them together might not give a meaningful result, so focusing just on jobs might be more appropriate.

If you can provide more specific details about the data or the tool you're using, I could offer more tailored advice.

 

View solution in original post

4 REPLIES 4
SmartSmith
Advocate I
Advocate I

To calculate the average sale price of all jobs using the two measures you've described, you'll need to use both measures in a specific way. Here's a general approach:

  • Use the First Measure (Est + Jobs): This measure gives you the total count of estimates and jobs. Let's call this TotalCount.
  • Use the Second Measure (Est Price + Job Price): This measure gives you the total sell price of estimates and jobs combined. Let's call this TotalPrice.
  • Calculate Average Sale Price:
    • If you want the average sale price across both estimates and jobs, you would divide the TotalPrice by the TotalCount. This gives you the average sale price per estimate/job.
    • Average Sale Price=TotalPriceTotalCount
    • Average Sale Price=
    • TotalCount
    • TotalPrice
    • However, if you specifically want the average sale price for jobs only, and assuming you have a way to separate the total sell price and count of jobs from estimates, you would use those specific totals. Let's say JobsCount is the total count of jobs and JobsPrice is the total sale price of jobs, then:
    • Average Job Sale Price=JobsPriceJobsCount
    • Average Job Sale Price=
    • JobsCount
    • JobsPrice
  • Implementation in a Data Analysis Tool: The exact method to implement this depends on the tool you're using (like SQL, Excel, a BI tool, etc.). You'll typically create a new measure or formula using the existing measures.
  • Considerations:
    • Ensure that the data types are compatible (e.g., both count and price should ideally be numeric).
    • Be mindful of how null values are handled in your dataset.
    • If the estimates and jobs are significantly different in nature, averaging them together might not give a meaningful result, so focusing just on jobs might be more appropriate.

If you can provide more specific details about the data or the tool you're using, I could offer more tailored advice.

 

Thank you!

amitchandak
Super User
Super User

@randyrettig , Create a measure like

 

Averagex(Values(Table[Job ID]), [Est Price] + [Job Price])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you!

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.

Users online (7,344)