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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

If conditional column based on two columns

Hi All,

 

I have a column where the Total Visitors have been counted , Total Men and Total Women.

 

I would like to make a new conditional column that result the value "Mix" if the column Total Men has value 1 or higher and the column Total Women has value 1 or higher. See example below in the red markered are:

 

Any suggestions?

 

Many thanks !

 

2018-08-08 16_41_04-ATHRTY Event 082018 - Power BI Desktop.png

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi regasanyoto,

 

Click Query Editor-> Add Columns-> Conditional Column. Then you can add you if... then..,else condition to create your conditional column.

 

Regards,

Jimmy Tao

Anonymous
Not applicable

HI @Anonymous

 

How about this column?

 

Mix? = IF(Table1[Men]>0 && Table1[Women]>0, "Mix","One Gender")

 Plase explain if you are looking for something else 🙂

 

Thanks

Raj

Anonymous
Not applicable

Hello @Anonymous,

 

The formula that you gave me is not working because its return the value Mix.

See the image below:

In the first two rows there are in total 3 visitors and those all women. The new created column callend New Column return Mix.

It suppose return Women.

 

In the second last row you see three total visitors that contains only Man. It suppose return Man.

 

Any suggestions?

 

Thanks 

 

2018-08-09 14_09_10-ATHRTY Event 082018 - Power Query-editor.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.