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
android11
Regular Visitor

Creating a new column if values in column 1 = column 2

Hi,

 

I am trying to create a new column that includes all names in column Fullname if they are equal 

to a certain value in column UserType.

 

If Mary Byrne in Fullname is of UserType "Caregiver", I want Mary added to a new column Caregiver.

Tried this with no luck -> Carergiver = IF( Users[FullName],[UserType]="Caregiver")

 

Carer Column.jpg

1 ACCEPTED SOLUTION
Neuro81
Helper I
Helper I

if you are doing this in Power Query then
this should do it
=if [usertype]="caregiver" then [Fullname] else ""

if you are creating a calculated column then its

Caregiver = if(users[UserType]="caregiver",users[Fullname],BLANK())

The first part of an IF is to check the logic so it checks to see if the first expression is true or false
then the second part is what is returned if its TRUE
and the last if it is false

-- ------------------------------ --
Please mark solutions as complete when your question has been answered
-- ------------------------------ --

View solution in original post

10 REPLIES 10

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.