Forum Discussion

pbrekelmans's avatar
pbrekelmans
New Member
8 years ago
Solved

Unique values from two columns

Hello all,

 

I'm still fairly new to this piece of software, but greatly impressed by the possibilities it has given, especially because i have a lack of real knowlegde on this matter. This forum has helped me countless times, but not on this (easy?) problem i'm having lately.

 

Situation:

I have a couple of datasheets. All of them share one unique value: the number of an  "object". This object can be related to our workers (table 1), or to other activities (table 2). I would like to make a graph showing for each object who handled it (table 1) and what activities where taken (table 2).

 

Problem:

I want to make one column with unique values (object-numbers) from those two tables. I just cant figure it out. Any help would very much be appreciated.

 

With kind regard,

  • pbrekelmans,

     

    You may add a calculated table as follows.

    Table =
    DISTINCT (
        UNION (
            SELECTCOLUMNS ( Table1, "object number", Table1[consumed by (object number)] ),
            VALUES ( Table2[client with problem (object number)] )
        )
    )
    

3 Replies

  • I am not sure if I understood your problem completely , but you can try to create Index column accordingly.

    If you can upload some sample data and the output required. This will help us in understanding the exact requirement.

    • pbrekelmans's avatar
      pbrekelmans
      New Member

      I don't think the index column will help me now. But i can show you some purely fictional tables that represent the "problem" (see below). I cannot connect table 1 and 2 because they have more than 1 value for some lines. I think i need to make a new list with unique values (table/list 3) to tackle this.  

       

      Table 1  
      datedinnerconsumed by (object number)
      1-1-2018Salisbury Steaks3223
      1-3-2018Beef Stroganoff2551
      1-4-2018Tacos3223
      1-5-2018taco salad 1221
      1-7-2018chicken fajaitas2551
         
         
      Table 2  
      dateclient with problem (object number)problem
      21-feb4562headache
      3-feb1221opstipation
      5-aug2551blurry view
      1-mrt2551frozen shoulder
      1-jun3223weak knees
         
         
      Table 3 (to be)  
      Object number  
      3223  
      2551  
      1221  
      4562  
      • v-chuncz-msft's avatar
        v-chuncz-msft
        Community Support

        pbrekelmans,

         

        You may add a calculated table as follows.

        Table =
        DISTINCT (
            UNION (
                SELECTCOLUMNS ( Table1, "object number", Table1[consumed by (object number)] ),
                VALUES ( Table2[client with problem (object number)] )
            )
        )