Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 Repacer.ReplaceValue() function, but it only allows me to replace one value, maybe I'm not being inventive enough and need to incorporate list functions or something?
Formula (used to define the day as 6-6 instead of 12-12 as per the standard formulas):
Date.DayOfWeek(
[Malfunct. start]
+ #duration(0,Time.Hour([#"Start Malfn (T)"]),Time.Minute([#"Start Malfn (T)"]),Time.Second([#"Start Malfn (T)"]))
- #duration(0,6,0,0)
,0)
Solved! Go to Solution.
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) )
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) )
I'm sure @ImkeF has the answer.
Imke Feldmann has a blog post that covers this
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
79 | |
64 | |
51 | |
30 |
User | Count |
---|---|
116 | |
114 | |
70 | |
66 | |
39 |