Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Token Comma Expected

Hi,    I am a novice Power Query user and I have broken my powerquery. Can you please help look over?    let Source = Folder.Files("C:\Users\Accountant\\Spreadsheet Data\Pocketwatch\ShiftReport"...
  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    4 years ago

    This line was problematic

    #"ONBeforeHours" = Table.AddColumn(#"OvernightAdditionalHours", "ONBeforeHours", each ((SleepoverHourStart-[Shift start time])*24),

    where you had one additional (. Making it

    (SleepoverHourStart will solve you issue.

    Also note - Next line is a Changed Type and you have already used it once. So, you will need to change it some other name say 18. Hence Change Type17 will also need change.

    Hence, replace those 3 lines with this

    #"ONBeforeHours" = Table.AddColumn(#"OvernightAdditionalHours", "ONBeforeHours", each (SleepoverHourStart-[Shift start time])*24),
    #"Changed Type18" = Table.AddColumn(#"ONBeforeHours","ONBeforeHours", each ([Shift end time]-SleepoverHourEnd)*24),
    #"Changed Type17" = Table.TransformColumnTypes(#"ChangedType18",{{"ONBeforeHours", type number}},{{"ONAfterHours", type number}}),