Forum Discussion

viferenc's avatar
viferenc
Icon for Helper II rankHelper II
4 years ago
Solved

Join two table with special criteria

Dear All,   I´m kindly asking for your support   I have two tables imported in Power BI Desktop.   in one of the table I have a list of transports done by the trucks. I have the transport ID, ...
  • v-zhangti's avatar
    4 years ago

    Hi, viferenc 

     

    You can try the following formula.

    KM diff between refueling = [Fueling KM high]-[Fueling KM low]
    Consumption (l/km) =
    DIVIDE ( [Fueling (liter)], [KM diff between refueling] )
    
    Used KM =
    IF (
        [Fueling KM high] >= [Ending KM],
        [Fueling KM high] - [Fueling KM low],
        [Fueling KM high] - [Starting KM]
    )
    
    Used Liter = [Used KM]*[Consumption (l/km)]

     

    Best Regards,

    Community Support Team _Charlotte

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