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

Create a new column based on values in another (Should be easy enough)

Hi All,

 

I have a column like so...

 

Status
Won
Lost
Open
Open
Won
Lost

 

I would like a new column created called "Decision Made" which would shange the values Won & Lost to Yes and and anything with Open to no, I twould look like below...

 

StatusDecision Made
WonYes
LostYes
OpenNo
OpenNo
WonYes
LostYes

 

Any help would be greatly appreciated! 😊

 

Many Thanks,

 

Taylor

1 ACCEPTED SOLUTION
ERD
Memorable Member
Memorable Member

@Ttaylor9870 ,

YourMeasure = IF ( table['Status'] IN { 'Won', 'Lost' }, "Yes", "No" )

https://dax.guide/if/ 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Stand with Ukraine!

Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

4 REPLIES 4
ERD
Memorable Member
Memorable Member

@Ttaylor9870 ,

YourMeasure = IF ( table['Status'] IN { 'Won', 'Lost' }, "Yes", "No" )

https://dax.guide/if/ 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Stand with Ukraine!

Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

Hi @ERD,

 

That's spot on thank you very much!😊

 

Many Thanks,

 

Taylor

speedramps
Super User
Super User

Must you use DAX.  the best option might be Power Query?

If you are a Power Bi novice

then go into Power Query

click on add column /column from example

type a few sampole values and artifical intellegence will do the rest.

Please try do some o line training about Power BI,

Click here for free training 

speedramps_0-1668614215203.png

 

 

Thanks for reaching out for help.

I put in a lot of effort to help you, now please quickly help me by giving kudos.

Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button. 

If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.  I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

Hi @speedramps ,

 

This is just one column in my table and the data is example data, I think I will need to use IF or Switch.

 

If status = yes or no, then assign to Yes,

 

If status = Open, then assign to No.

 

This in a DAX formula would be perfect.

 

Many Thanks,

 

Taylor

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors