Forum Discussion

Philip0123's avatar
Philip0123
Frequent Visitor
7 years ago
Solved

Power query M function simlar to DAX SWITCH()

Hi,   I'm not that familiar with the M language, but I've got a formula (see below) with output = 1 to 7 representing the day of the week. I need to replace the number with the day name.  Tried the...
  • Stachu's avatar
    7 years ago

    will Date.DayOfWeekName do the job? As below:

    Date.DayOfWeekName(
    [Malfunct. start] 
    + #duration(0,Time.Hour([#"Start Malfn (T)"]),Time.Minute([#"Start Malfn (T)"]),Time.Second([#"Start Malfn (T)"]))
    - #duration(0,6,0,0)
    )