Forum Discussion

Prash546's avatar
Prash546
Icon for Helper I rankHelper I
6 years ago
Solved

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'

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

4 Replies

  • artemus's avatar
    artemus
    Icon for Microsoft Employee rankMicrosoft 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.

    • Prash546's avatar
      Prash546
      Icon for Helper I rankHelper I

      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's avatar
        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