[Solved] Calculate Total male Total Female in powerbi report


To get the results you are looking for, follow these steps:

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

    GenderCounts = DISTINCT(TableName[Gender])
    
  2. Make a relationship from the newly create table back to the original table
    Relationship on Gender column

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

    Count = COUNTROWS(RELATEDTABLE(TableName))
    

And there you have a second table containing the counts of each gender.
Results

For more information and other possibilities, check out a related Power BI Community forum post here and Stackoverflow questions here and here.

solved Calculate Total male Total Female in powerbi report