cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

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

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Average of Percentage Column

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 %])

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Highlighted
Super User IV
Super User IV

Re: Average of Percentage Column

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/
Highlighted
Super User IV
Super User IV

Re: Average of Percentage Column

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 %])

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

Highlighted
Microsoft
Microsoft

Re: Average of Percentage Column

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

Highlighted
Super User IV
Super User IV

Re: Average of Percentage Column

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/
Highlighted
Microsoft
Microsoft

Re: Average of Percentage Column

Awesome that worked like charm.

 

Thank you so much.

 

Thanks

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors