Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Searching value in one column in another column

Hi Experts,

 

I need to search for a value of column "Assigned ID" in "Approver ID" respective of their "Requisition ID" eg

 

Requisition IDAssigned IDApprover ID
111MJ2MK1
111MJ2JK2
111MJ2MJ2
111MJ2SK4
222HJ1MJ2
222HJ1SK4
222HJ1UH6
222HJ1HJ1

 

I want my results to look like:

 

Requisition IDAssigned IDApprover IDAudit
111MJ2MJ2Found
222HJ1 Not Found

 

  • Hi Anonymous ,

     

    you may consider creating 2 columns :

    1. Flag comparing Assigned ID & Approver ID. 

    Audit_Flag = 'Table'[Assigned ID] = 'Table'[Approver ID]

    2. All Requisitions IDs which contain at least 1 TRUE flag from previous column will be marked as TRUE otherwise FALSE

    Audit_Result = CALCULATE(CONTAINS('Table','Table'[Audit_Flag],TRUE()),ALLEXCEPT('Table', 'Table'[Requisition ID]))

    Final table will look like this:

    Let us know if it helped!

    Matej

     

     

5 Replies

  • Hi Anonymous ,

     

    you may consider creating 2 columns :

    1. Flag comparing Assigned ID & Approver ID. 

    Audit_Flag = 'Table'[Assigned ID] = 'Table'[Approver ID]

    2. All Requisitions IDs which contain at least 1 TRUE flag from previous column will be marked as TRUE otherwise FALSE

    Audit_Result = CALCULATE(CONTAINS('Table','Table'[Audit_Flag],TRUE()),ALLEXCEPT('Table', 'Table'[Requisition ID]))

    Final table will look like this:

    Let us know if it helped!

    Matej

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks A lot.

       

      That is what i was looking for.

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      MatejZukovic 

      Thanks for the solution and the final table loooked great. I require one more help on this, I need a table view on dashboard with one line each of requisition ID with its audit column. Just like the below table:

      Requisition IDAssigned IDApprover IDAudit
      111MJ2MJ2Found
      222HJ1 Not Found
      • MatejZukovic's avatar
        MatejZukovic
        Icon for Resolver I rankResolver I

        Hi Anonymous ,

         

        you can create one more column :

         

        Then create a table in your report bringing in Requisition ID, Assigned To, and the column created above. Unselect "Other Matches" in the table through a filter.

         

         

    • ramdasanudas's avatar
      ramdasanudas
      Frequent Visitor

      Thanks I was looking for similar thing to look Column1 value (A) in Column2 values (A,B) in same table.

      Solution: CONTAINSSTRING worked