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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
damit23183
Microsoft Employee
Microsoft Employee

Average of Percentage Column

Calculate Average of %.JPG

 

 

 

 

 

 

 

Hi,

 

I would like one help to calcualte average of Health% column as you can see above. Health% column is Measure i have created based on logic. I need to calcualte Average of Health% in CUSTOMER EXPERIANCE box where currently result is INFINITY. The result should be 93.37% instead of Infinity if you sum of Health% values divide by 3 because there are 3 KPI.

 

In future, KPI will increase for sure so looking for dynamic solution if there will be 5 KPI then SUM of Health% should be divide by 5. And So on.

 

I tried by below formula:

 

Measure = DIVIDE (Health%, No of KPI)

 

WHere No of KPI = COunt (KPI Name) but its not working.

 

Any help would be appreciated!

 

Thanks

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

So, what you want to do is to create a table variable that is the same as your visual displayed and then do an AVERAGEX across it. So let's say that you have a table with exactly the columns you have in your visual minus your measure, you would do this:

 

Average of Measure =
  VAR __Table = 
    ADDCOLUMNS(
      'Table',
      "__Health %",[Health %]
    )
RETURN
  AVERAGEX(__Table,[__Health %])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

So, what you want to do is to create a table variable that is the same as your visual displayed and then do an AVERAGEX across it. So let's say that you have a table with exactly the columns you have in your visual minus your measure, you would do this:

 

Average of Measure =
  VAR __Table = 
    ADDCOLUMNS(
      'Table',
      "__Health %",[Health %]
    )
RETURN
  AVERAGEX(__Table,[__Health %])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Awesome that worked like charm.

 

Thank you so much.

 

Thanks

Ashish_Mathur
Super User
Super User

Hi,

Do any of these work?

No of KPI = Counta(KPI Name)

No of KPI = DISTINCTCOUNT(KPI Name)

If not, then share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

 

Thank you for your response. 

 

Unfortunately, i wont be able to send you PBIX file due to data privacy. However, none of count work. 

 

Is there any other work around to get what i am looking for?

 

Thanks

Hi,

Try this

=IF(HASONEVALUE(Data[KPI]),[Health%],AVERAGEX(SUMMARIZE(VALUES(Data[KPI]),Data[KPI],"Avg",[Health%]),[Avg]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.