Forum Discussion
SachinC
6 years agoHelper V
Sort by Date X - Axis
Hi, I am connecting to a SQL server instance. I have a date/time field called DateInspected. I want to use this field but want to convert this date field to mm-yyyy and use this in a bar chart and ...
- 6 years ago
Hi SachinC ,
Syntax I gave you is for a DAX column you should replace the dot comma by comma (it's regional setting thing).
FORMAT([DateInspected],"mm-yyyy")On the query editor the formula should be:
Text.Combine({Date.ToText([DateInspected], "MM"), "-", Date.ToText([DateInspected], "yyyy")})
Greg_Deckler
6 years agoCommunity Champion
Try replacing the semi-colons in MFelix 's solution with commas. It varies based on language version of Power BI Desktop.