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.
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?
Solved! Go to 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])
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.
@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,
Happy to help!
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])
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.
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])
Proud to be a Super User!
Hi @tebtim19 ,
You can click "show details" to check the error message.
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.
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.
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,
Happy to help!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |