Calculate Total number of Male Female in the PowerBI report

0 votes

I want to count the total number of males and females in a PowerBI report such that, if my report table looks like the one given below:

Name    Gender
std1    Female
std2    Male
std3    Female
std4    Male
std5    Male
std6    Male

The result I should be:

Female 2
Male   4
Feb 28, 2019 in Power BI by Shubham
• 13,480 points

1 answer to this question.

0 votes

To achieve what you are looking for, you could do the folllowing;

  1. Make a new table using the New Table button with the following code:

    GenderCounts = DISTINCT(TableName[Gender])
  2. Make a relationship from the new table with the original table 

  3. Add a new column to the GenderCounts table with the following code:

  4. And there you have another table containing the count for each gender. 

answered Feb 28, 2019 by Upasana
• 8,620 points

Related Questions In Power BI

0 votes
1 answer
0 votes
1 answer

How to Toggle Between Two Option and Make it Interact with the rest of the Visualizations in a Report?

Toggling is an action that is achieved ...READ MORE

answered Oct 20, 2020 in Power BI by anonymous
• 65,950 points
+1 vote
1 answer

Show the latest value in PowerBi from ASA

Best you can do right now is ...READ MORE

answered Oct 25, 2018 in Power BI by Surendra
0 votes
1 answer

Calculated column with the sum of values from many columns in a row

Hi, You can create a new column by ...READ MORE

answered Mar 14, 2019 in Power BI by Cherukuri
• 33,010 points
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,150 points
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 21, 2018 in Power BI by nirvana
• 3,150 points
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,570 points
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Yes using Power BI REST API to ...READ MORE

answered Sep 18, 2018 in Power BI by Kalgi
• 52,370 points
0 votes
1 answer

To Calculate the Standard Deviation in Power BI

Suppose you've to obtain the Standard Deviation ...READ MORE

answered Nov 26, 2018 in Power BI by Upasana
• 8,620 points
0 votes
1 answer

To expand all lists in a row of lists at the same time without recurring values

Can't promise simple, but I have something ...READ MORE

answered Feb 19, 2019 in Power BI by Upasana
• 8,620 points