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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.