Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 51 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 65 | |
| 39 | |
| 33 | |
| 23 |