Forum Discussion
Sort by Date X - Axis
- 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")})
MFelix,
Good shout - that didn't work.
In Edit Query, when I try to create a custom field called DateInspectedNEW, using: FORMAT([DateInspected];"mm-yyyy"), it says: Token Comma expected.
When I create a new field in the Fields list; I get: The syntax for ';' is incorrect. DAX(FORMAT([DateInspected];"mm-yyyy"))).
The original field: DateInspected is of Data type: Date, Format: 13/03/2001 (dd/MM/yyyy)
Please help!
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")})