Forum Discussion

siva3012's avatar
siva3012
Helper II
9 years ago
Solved

I need to Merge two tables?

  Hi, I need to merge these two tables which contain Price and Qty. I have to merge using using Date and Time. Can anyone solve this as there exisits two Time columns  ?          
  • v-sihou-msft's avatar
    9 years ago

    siva3012

     

    In this scenario, you can SUMMARIZE your QTY table group on Time_1 and Time_2 into two calculated tables, then UNION these two tables together and build relationship to Price table on Time column.

     

    Or you can create a conditional LOOKUP column in Price table to get the QTY from QTY table:

     

    Qty =
    IF (
        LOOKUPVALUE ( QTY[QTY], QTY[Time1], Price[Time] ) = BLANK (),
        LOOKUPVALUE ( QTY[QTY], QTY[Time2], Price[Time] ),
        LOOKUPVALUE ( QTY[QTY], QTY[Time1], Price[Time] )
    )

     

     

    Regards,