Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Public Transportation Total Hours of Service Per Day

    Posted Apr 01, 2021 02:50 AM
      |   view attached
    I am working in public transport planning. PowerBi is an incredible program ... It is very useful for my Public Transport reporting works.

    I have to calculate the total hours of service per day on the lines we serve.

    I can calculate the first and last hour, but if the last hour is after 00:00, my calculation is incorrect.

    Sample working file is attached. How can I solve this. (Note: my data source file is xlsx)


    Public Transportation Lines Total Daily Service Duration Calculator


    ------------------------------
    Tacettin TEZER
    ------------------------------

    Attachment(s)

    xlsx
    line_250_timetable.xlsx   15 KB 1 version


  • 2.  RE: Public Transportation Total Hours of Service Per Day

    Posted May 12, 2022 06:59 AM
    #"Added Custom2" = Table.AddColumn(#"Changed Type1", "Total hours ", each if [#"sign off time_1 - Copy"]<[#"sign on time - Copy"] then Duration.ToText([#"sign off time_1 - Copy"]-[#"sign on time - Copy"]+ #duration(1,0,0,0))
    else Duration.ToText([#"sign off time_1 - Copy"]-[#"sign on time - Copy"]))

    ------------------------------
    Ivona T
    Data Analyst
    ------------------------------