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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
majo23
Frequent Visitor

Average rate calculation

 
Hi everyone,

I want to get the average of the percentage that I calculate in a measure

I made 3 measures,

 

Count HBRA = CALCULATE ( COUNTA ( 'table1'[Span HBRA] ) )

Count HBRA inspections = CALCULATE ( COUNTA ( 'table1'[Span HBRA] ), 'table1'[Span HBRA] = "inspections")

rate HBRA = [Count HBRA inspections] / [Count HBRA]

 

But for the total rate I need the average of the table and not the divition on the total Count HBRA inspections and total Count HBRA. 

I have this in the matrix table

 

FeederCount HBRACount HBRA inspectionsrate HBRA
ARTRW33630.89%
ART03419484.12%
HOTSTL10932.75%
Total639142.19%

 

I need to made the sum of the rate HBRA and then divide it with the number of Feeders that I have (in this case 3), so i shouldnt be 2.19%, but AVERAGE (0.89% + 4.12% + 2.75%), powerbi doesnt let due measure calculations and not columns.

 

thank you in advance

MJ

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @majo23 ,

 

You can use SUMMARIZE to create a virtual summary table and AVERAGEX to get the average. Assuming that granularity is based on Feeder column, try the measure below.

=
AVERAGEX ( SUMMARIZE ( datatable, datatable[Feeder], "HBRA", [HBRA] ), HBRA )

Change the table and column names accordingly.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @majo23 ,

 

You can use SUMMARIZE to create a virtual summary table and AVERAGEX to get the average. Assuming that granularity is based on Feeder column, try the measure below.

=
AVERAGEX ( SUMMARIZE ( datatable, datatable[Feeder], "HBRA", [HBRA] ), HBRA )

Change the table and column names accordingly.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks for the reply @danextian, I was thinking about a simple measure instend of making a table but is a solution, thanks! have a good day 🙂

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors