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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Community Champion
Community Champion

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors