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 in Power BI by Shubham
• 12,150 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 by Upasana
• 7,560 points

Related Questions In Power BI

+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 in Power BI by CHERUKURI
• 13,860 points
0 votes
1 answer

How to calculate cumulative Total and % in DAX?

Hi, If your table is ready with percentage ...READ MORE

answered Mar 18 in Power BI by CHERUKURI
• 13,860 points
0 votes
1 answer

Can I get rid of the grey border on the report visuals with power bi embedded?

You can do the following to make the ...READ MORE

answered Apr 10 in Power BI by Shubham
• 12,150 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,040 points
0 votes
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,040 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
• 14,080 points
0 votes
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
• 35,750 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
• 7,560 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 in Power BI by Upasana
• 7,560 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.