Forum Discussion

dnsia's avatar
dnsia
Helper II
5 years ago
Solved

How to insert a conditional row

Hi all,    I am trying to calculate the total number of containers loaded for each vessel / voyage but it is not showing the number of containers that came from transshipment (airline term: layover...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  dnsia  ,

    Here are the steps you can follow:

    1. Create calculated table.

    Table =
    GENERATEALL(
        'Transshipment (Layover)',
        var _table1BL='Transshipment (Layover)'[BL Number]
        return
        SELECTCOLUMNS(
            CALCULATETABLE('Destination','Destination'[BL Number]=_table1BL),
            "Load port",'Destination'[Load Port]))
    Table 2 =
    GENERATEALL(
        'Table',
        var _table1BL='Table'[BL Number]
        return
        SELECTCOLUMNS(
            CALCULATETABLE('Volume','Volume'[BL Number]=_table1BL),
            "Discharge Port",'Volume'[Discharge Port]))

    2. Result:

    You can downloaded PBIX file from here

     

    Best Regards,

    Liu Yang

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