Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi i have a data column Gender
I need to count Male and Female and the average percentage will be 50%
Solved! Go to Solution.
Hi @blockobito ,
If you want to calculate the percentage of males and females in the total, you can try this code.
Percentage =
VAR _Total =
CALCULATE ( COUNT ( 'Table'[User] ), ALL ( 'Table' ) )
VAR _Each_Gender =
CALCULATE ( COUNT ( 'Table'[User] ) )
RETURN
DIVIDE ( _Each_Gender, _Total )
My Sample:
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @blockobito ,
If you want to calculate the percentage of males and females in the total, you can try this code.
Percentage =
VAR _Total =
CALCULATE ( COUNT ( 'Table'[User] ), ALL ( 'Table' ) )
VAR _Each_Gender =
CALCULATE ( COUNT ( 'Table'[User] ) )
RETURN
DIVIDE ( _Each_Gender, _Total )
My Sample:
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Measure = CountRows(table)
Then place a visual with the gender and the Measure as the column. Can be added twice and use second as % of total.
If you need to split it up into separate records...
Measure Male =
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
55 | |
38 | |
31 |
User | Count |
---|---|
71 | |
64 | |
60 | |
50 | |
45 |