Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Connect Data from Two Tables

I am creating a company turnover graph.
X-Axis - Sites

Y-Turnover Numbers

I have included a slicer that filters for dates, and another slicer for job sites.

The above works when filtering dates and job sites.

My issue that I am having is that I need to include site head count.
I have included 2 Cards to show these values. 1st Card - Head Count # and 2nd Card - Turnover #

When I go to the filters (date/site), the Turnover Numbers will change but the Head Count will continue to show the full company Head Count.

Head Count Numbers are from a separate table, which is causing the problems.

 

Breakdown is this
Axis
Job Site (table 1)
Date (Months) (table 1)

Values 
Turnover #s (table 1)
Head Count #s (table 2)

 

Can anyone help me out as to why the Headcount does not reflect the filters? 

Thank you

4 Replies

  • truptis's avatar
    truptis
    Community Champion

    Hi Anonymous , you need to have a relationship between these two tables so that the filtering works.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi truptis 
      I tried to do that but I'm not sure what to connect it to in the other table.
      When managing the relationship it was easy for Job Site and Date Values as each table had the same information, so connecting was straight forward.

      I'm not too sure what to 'connect' Head Count to in Table 1. I tried to connect it to Date as well, but the filter option does not work.

      • truptis's avatar
        truptis
        Community Champion

        Hi Anonymous ,

        In your table 2, check the data type of Date field(make it as date-same as table 1) and then make a relationship on the date field between these 2 tables.

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Please try to create a bridge table and create a relationship with the other two tables.

    For example.

    Table = DISTINCT ( UNION ( DISTINCT ( 'Table1'[Date] ), DISTINCT ( 'PB-Test'[Date] ) ) )

    Then use the 'Table1'[Date] column as the slicer's field and check.

    The same operation for the [job sites] column.

     

    If this doesn't work for you or I misunderstand your needs, please consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.

     

    Best Regards,
    Community Support Team_Gao

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data