Forum Discussion

learn2learn's avatar
learn2learn
Regular Visitor
5 years ago
Solved

Finding Shipment IDs that do not match

Hi, I am new to powerbi, please help.

I have a data that is structured like this: 

 

I wanted to find the ShipmentID's were import and export do not equal. 

Thank You!!!! 

  • learn2learn . Create a new column like

     


    new column =
    var _imp = sumx(filter(Table, [shipmentID] =earlier([shipmentID]) && [Direction] ="Import"),[Weight])
    var _exp = sumx(filter(Table, [shipmentID] =earlier([shipmentID]) && [Direction] ="Export"),[Weight])
    return
    if( _imp = _exp , True(), false())

2 Replies

  • learn2learn . Create a new column like

     


    new column =
    var _imp = sumx(filter(Table, [shipmentID] =earlier([shipmentID]) && [Direction] ="Import"),[Weight])
    var _exp = sumx(filter(Table, [shipmentID] =earlier([shipmentID]) && [Direction] ="Export"),[Weight])
    return
    if( _imp = _exp , True(), false())