Forum Discussion

lore256's avatar
lore256
Frequent Visitor
8 years ago
Solved

Pb to calculate Leadtime

Hi,   I'm a beginner with Power Bi Desktop and I still discover this tool. I hope somebody can help me :). I explain my problem from the beginning: I must calculate the Leadtime between two movem...
  • v-piga-msft's avatar
    8 years ago

    Hi lore256,

     

    Fo you scenario, you could create a calculated table with SUMMARIZE.

     

    Please have a reference of the formula below and modify it for your requirement.

     

    Table 2 =
    SUMMARIZE (
        'Table',
        'Table'[Parcel Number],
        "Take in charge_", CALCULATE (
            MIN ( 'Table'[Movement data and time] ),
            FILTER ( 'Table', 'Table'[Movement label] = "Take in charge" )
        ),
        "Drop Off_", CALCULATE (
            MAX ( 'Table'[Movement data and time] ),
            FILTER ( 'Table', 'Table'[Movement label] = "Drop Off" )
        )
    )
    

     

    Column = 'Table 2'[Take in charge]-'Table 2'[Drop Off]

    Here is the output.

     

     

    Best Regards,

    Cherry