Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Comparing date column from different tables

Hello,
I have two different table and need to compare match date column from those tables 
for eg. i want show show platform wise data by match dates from two tables 
please help thank you in advance 
sharing ss of the tables

4 Replies

  • Anonymous Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Mahesh0016  Thank you for your reply ,I wont be able to share file with you but the result which i want is ,I want to show Table(2)counts plarformwise ,so issue which i am facing is 
      1.i want to match mobile numbers on both the tables
      2.i want to match call date and created date on both tables
      3.platform data is not available on table 2

      • v-yueyunzh-msft's avatar
        v-yueyunzh-msft
        Community Support

        Hi , Anonymous 

        According to your description, you wan to compare the three column in both tables.

        Here are the steps you can refer to :
        This is my test data:

        If you need to get the same rows as a table , you can click "New Table" and enter this:

        Table = INTERSECT( SELECTCOLUMNS('Table A',"mobile num",[mobile num],"Name",[Name],"call Date",[created Date]) ,'Table B')

        Then we can get this :

         

        If you just need the count of this table in the visual , you can create a measure:

        Measure = COUNTROWS( INTERSECT( SELECTCOLUMNS('Table A',"mobile num",[mobile num],"Name",[Name],"call Date",[created Date]) ,'Table B'))

        The result is as follows:

         

        Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

         

        Best Regards,

        Aniya Zhang

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello ,Thank you for your reply Sharing my dta atable with column names as i cannot send you the data
    I have 2 data tables FF and YF
    following are my requirements
    1.Platformsie(Platform column in FF Table)FF counts and YF Counts
    2.Region and dealersie(columns available in YF Table) FF and YF Counts

    Things I have tried
    since there is no common column between two Tables ,I have merged mobile number and date in both the tables and used that column to combine both the tables but as there is duplicationin both the tables it is gicing an many to many relationship error , please let me know thw solution for this