Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Summarize table

Hi

 

I am new to PBI, and I need to calculate a column, or make a new table where I can see infomration of 2 tables:
I have a table called 'CLIENT 'where existe the column [ID_CLIENT], it has unique data,

and I have a second table called' DELIVERY ', where I have the same column [ID_CLIENT], but in this table I have information from many more customers.

How can I  get only  the information that is on the 'DELIVERY¨ table, but only the customers of the tabala' CLIENT' only,

How I can remove the second table´s information acording to the clients I have in the first one

 

Here is an example: 

 'CLIENT 

ID_CLIENTIVFV
1023189:00:0017:00:00
1084398:00:0016:00:00
1011748:00:0012:00:00

 

'DELIVERY´

ID_CLIENTDelivery Hour
10231810:00
10843911:00
10117413:23
10114512:00
10124312:00
10231811:00

 

Create a table only with the info in Bold

 

 

Thanks!

  • Anonymous,

     

    Establisg a 1:many relationship between Clinet and Delivery table using Client ID column.

     

    Then create a new table (Modelling -> New Table) using:

    New Table =
    Var t1 = DISTINCT(Client[Clied_ID])
    RETURN
    NATURALINNERJOIN(t1, Delivery)

     

     

    If this solves your problem please mark as the solution.

2 Replies

  • Hi there,

    What I would do is to create a relationship between the two tables on the ID_CLIENT

    Then I would create a new table from DELIVERY.
    Next I would then create a calculated column using the RELATED function to bring across the IV and FV columns.
  • anandav's avatar
    anandav
    Skilled Sharer

    Anonymous,

     

    Establisg a 1:many relationship between Clinet and Delivery table using Client ID column.

     

    Then create a new table (Modelling -> New Table) using:

    New Table =
    Var t1 = DISTINCT(Client[Clied_ID])
    RETURN
    NATURALINNERJOIN(t1, Delivery)

     

     

    If this solves your problem please mark as the solution.