Find Percentage of Female from Gender Column — Power-BI

Friends, there is a very simple formula to find female or male percentages from a gender column.

Suppose your objective is to plot a line chart of year-wise female employee percentages from the employee data in Power-BI. The required plot is given below which is created in excel.

Below is the sample employee data ‘data’ provided to you.

You are going to use only two columns Gender and Year to plot the above chart.

In Power-BI, you need to create a ‘New Measure’ for this as —

%Female = COUNTROWS(FILTER(RELATEDTABLE(data),data[Gender]= “Female”)) / COUNTROWS(data)


%Female = COUNTROWS(FILTER(RELATEDTABLE(data),data[Gender]= “Female”)) / COUNTROWS(RELATEDTABLE(data))

  • The COUNTROWS function counts the number of rows in the specified table, or in a table defined by an expression.
  • The FILTER function returns a table that represents a subset of another table or expression.
  • The RELATEDTABLE function evaluates a table expression in a context modified by the given filters.

Once this is created, follow the below steps:

Select ‘Line chart’ from the visualizations section:

In ‘Axis’, add the ‘Year’ column. Note you need to select ‘Don’t Summarize’ for the column ‘Year’ before adding it to the axis (Click on Year column from Fields section and select ‘Don’t summarize’).

And add the ‘%Female’ measure to the ‘Values’.

Do some formatting for Y and X-axis and for data labels then you are done!


Thanks for reading ❤

For any suggestions or queries, leave your comments below and follow for updates.

If you liked the article, please hit the 👏 icon to support it. This will help other Medium users find it. Share it, so that others can read it!

Happy Learning! 😊




Data Analyst at Infosys Ltd., AI Engineer, MSc. Statistics SPPU.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Navigating Amsterdam land use using Geopandas, Osmnx and Amsterdam openAPI

Contactless Health Insurance Cards: An Approach to Safeguard Healthcare Users and Frontline Admin

Big Data: Three Different Ways to Handle Data That Can’t Fit into Memory (Part III)

Ranking Food Items by Similarity

Forest Cover Type

The Covid Toll in India: Flaws in The New York Times Report

Matching Algorithms to Business Problems in 4 Steps

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Priyanka Dandale

Priyanka Dandale

Data Analyst at Infosys Ltd., AI Engineer, MSc. Statistics SPPU.

More from Medium

How Offers and Promotions Influence Starbucks Sales

ETV: extraction, transformation, visualization

Finding the Limit: Formula 1 Data Visualizations and Points Prediction

The best chart you (probably) never heard about before.