cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vijay22kar
Helper II
Helper II

Column creation by using If condition

Hi All,

I have 4 different columns i.e user1, user2, set A, and set B

If set A = "WIP" then the New column should be as user1, else if set B = "WIP" then the New column should be as user2.

How to do this. Please help.

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
bcdobbs
Super User
Super User

Create a calculated column with following:

 

SWITCH ( 

   TRUE (),

   TableName[Set A] = "WIP", TableName[User 1],

    TableName[Set B] = "WIP", TableName[User 2],

    BLANK ()

)

   



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

1 REPLY 1
bcdobbs
Super User
Super User

Create a calculated column with following:

 

SWITCH ( 

   TRUE (),

   TableName[Set A] = "WIP", TableName[User 1],

    TableName[Set B] = "WIP", TableName[User 2],

    BLANK ()

)

   



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!