Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

View all the Fabric Data Days sessions on demand. View schedule

Reply
android1
Post Patron
Post Patron

Measure to identify text values who correspond to a value in another column

Hi,

 

I have a column Fullname which contains people whoe are either male or female. The male/female is listed as text values in another column called gender. I need to seperate all the males & females. Not sure if a measure is even the best way to do this.

6 REPLIES 6
Anonymous
Not applicable

Have you tried:

 

Measure =
CALCULATE ( [Your Measure Expression Here], TableName[Gender] = "Male" )

 

Not sure if you're trying to count the number of males or females, but Calculate will allow you to modify the filter context.

 

You may also want to put [Gender] on either a slicer or an axis of a graph.  That will separate the two genders.

 

Maybe post what your final expected result is?

 

Best,

 

~ Chris

Thanks Chris,

 

This is'nt working for me. I need all the names in column Fullname in  2 seperate columns, Male & Female. The names in Fullname have a coresponding value, male or female in column Gender. Thomas Yorke is identified as male in coumn Gender, Sarah Connor is Female.

Sean
Community Champion
Community Champion

@android1 Go to the Query Editor and follow the steps in the picture...

Conditional Columns.png

Hi Sean,

 

I have a LIVE CONNECTION TO THE db SO UNFORTUNATELY THIS WONT WORK.ERRORR.jpg

Sorry about the CAPS, didn't realise it was on.

@android1

 

Since you are using live connection, you can't do any modeling within Power BI Desktop, you have to do it in your data source. If it's also a tabular, you can add calculated columns like:

 

Male = IF(Table[Gender]="Male",Table[FullName],BLANK())

Female = IF(Table[Gender]="Female",Table[FullName],BLANK())

Regards,

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors