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
tebtim19
Helper IV
Helper IV

Average of count

I have a card in Power BI which is the comes from the count of all employees. But I want it to show as percentage in card is that possible?

1 ACCEPTED SOLUTION

Hi @tebtim19 ,

 

What exactly do you need? Average of count or average of percentage?

percentage = SELECTEDVALUE('Table'[count])/CALCULATE(SUM('Table'[count]),ALL('Table'))

average of percentage = AVERAGEX('Table',[percentage])

5.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

9 REPLIES 9
amitchandak
Super User
Super User

@tebtim19 , percent of what ?

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Okay for example I put a card then add count of employees. but I want to show it as Average? 

Hi. Is there any condition for this percentage? The average you are looking for is only available in numbers and employee column is not. It's not quite clear what kind of percetage you want. I am writting down a classic formula for a measure to calculate the % total general of employees in the dataset.

% Employees =
DIVIDE(
    COUNT(Table[Employee]),
    CALCULATE( COUNT(Table[Employee]), ALL(Table) ),
    0
)

There are better ways to calculate this but I'm not sure if this is what you are looking for.

 

Regards, 


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

I tried what you told me, but I dont understand why I only get 1% in the card when I put the measure

Hi @tebtim19 ,

 

What exactly do you need? Average of count or average of percentage?

percentage = SELECTEDVALUE('Table'[count])/CALCULATE(SUM('Table'[count]),ALL('Table'))

average of percentage = AVERAGEX('Table',[percentage])

5.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

 

I tried to do the average of count but I only get Can't display the visual. when I put added it to the card

 
 

Try Following 

 

Average = AVERAGEX(VALUES(Table[Manager]),[FemaleCountMeasure])

 







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

Proud to be a Super User!




Hi @tebtim19 ,

 

You can click "show details" to check the error message.

6.PNG

And what your table looks like? Better to show some sample data to us as i did above.

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

This might be because of two things. One is the formatting, consider formatting the measure as % or add decimals to avoid power bi rounding up your number.

https://community.powerbi.com/t5/Desktop/Percentage-formatting-for-calculated-measures-in-table/td-p...

The other thing can be because unless you filter something you will have a 100% because the calculation is FilteredEmployees / AllEmployees

That is what I understood about the measure.

Regards,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

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.