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
Ttaylor9870
Helper III
Helper III

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
Super User
Super User

@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. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

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
Super User
Super User

@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. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

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
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.

Top Solution Authors