Compare two data columns with different time stamp columns

William 41 Reputation points
2021-04-15T07:26:01.847+00:00

I am trying to compare two data columns with different time stamp columns. The first columns look like this: 88085-image.png

The second columns look like this: 88096-image.png

And i want to compare them like this: 88142-image.png

I have thousands rows in my columns to compare, so an answer to this problem would really help me.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
23,910 questions
No comments
{count} votes

Accepted answer
  1. Lz._ 8,801 Reputation points
    2021-04-29T08:37:42.193+00:00

    @William
    I didn't change anything to your data, I took what I found in sheet Ark1, that's it.
    In this updated version I copied/pasted the values from sheet Ark2 into Tabell1 and reformatted the 4 columns
    Is this OK now?

    No comments

2 additional answers

Sort by: Most helpful
  1. Lz._ 8,801 Reputation points
    2021-04-15T18:03:36.827+00:00

    Hi @William

    2 columns named "Time" means those columns are necessarily in different tables, what I assumed below:

    let  
    // Tables for demo  
        Table1 = Table.FromRows(  
            {{#time(0,0,0),"A"},{#time(2,0,0),"B"},{#time(3,0,0),"C"},  
             {#time(5,0,0),"D"},{#time(6,0,0),"Z"}},  
            type table [Time=time, Column1=text]  
        ),  
        Table2 = Table.FromRows(  
            {{#time(0,0,0),"E"},{#time(1,0,0),"F"},{#time(2,0,0),"G"},  
            {#time(3,0,0),"H"},{#time(4,0,0),"I"},{#time(5,0,0),"J"}},  
            type table [Time=time, Column2=text]  
        ),  
    //  
        JoinedTables = Table.NestedJoin(  
            Table1,"Time",  
            Table2,"Time",  
            "Tbl2", JoinKind.Inner // or JoinKind.LeftOuter depend. on the expected result  
        ),  
        Expanded = Table.ExpandTableColumn(JoinedTables, "Tbl2", {"Column2"}, {"Column3"})  
    in  
        Expanded  
    

  2. Lz._ 8,801 Reputation points
    2021-04-26T21:18:00.983+00:00