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
Prash546
Helper I
Helper I

I want to create a column using IF and condition using already present text column

I have a column name 'return' having values 'Yes', 'No' I want to create a column 'check' where value 'All' = 'Yes' +'No' and value 'Yes' = 'Yes', so my final column check will contain  values only 'All' and 'Yes'

1 ACCEPTED SOLUTION
artemus
Employee
Employee

Create a table like:

FilterYes_No
AllYes
AllNo
YesYes

And another table like:

Yes_No
Yes
No

Create a relationship where there is a on to many on the two tables (using the yes_no column)

Set the filter direction in the relationship to bidirectional.

 

Finally, add the Filter column to your filter visual.

View solution in original post

4 REPLIES 4
artemus
Employee
Employee

Create a table like:

FilterYes_No
AllYes
AllNo
YesYes

And another table like:

Yes_No
Yes
No

Create a relationship where there is a on to many on the two tables (using the yes_no column)

Set the filter direction in the relationship to bidirectional.

 

Finally, add the Filter column to your filter visual.

Hello Thanks for suggesting solution, but it dint work as expected though I created new two tables and linked them and after bringing the filter field into visual filter it dint work,  how is the new two tables created is linked to the main table already present which already contains field having values YES and NO

Anonymous
Not applicable

Hi @Prash546 ,

 

Could you please post a sample of your data (or a mock-up) to demonstrate your scenario?

Do you mean that the "return" column takes either Yes or No, or this can be both (kind of "Yes+No")?

 

If this is the latter case (Yes+No & Yes), can you add another column if [return] = "Yes+No" then "All" else "Yes"?

 

If this is either Yes or No, why there would not be a scenario that ends up as "No" in addition to "All" and "Yes"?

Do you group it in some way? Can you guarantee case-consistent output in the "return" column? Or  Yes, yes, YEs are valid option/outcomes (this usually happens in the entry is user dependant)?

 

Thanks,

JB

I was able to fix with the solution you provided via creating relationships. Thanks

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
Top Kudoed Authors