Anu
Anu

Reputation: 1

DAX and FORMAT function

i have a field for date with date, month and year.In my visualization, I need date to be displayed in (MON-Year) format. I switched to data view, created calculated column with

Mon-Year = FORMAT('table'[Date],"YYYY-MM")

Now it's getting displayed as (YEAR and Month number) but I want to change it as month name. After changes in data view, when I close apply, the column is present but there is no data type visible.

enter image description here

Should I create different calculated fields for year and month separately and then concatenate it? any help would be appreciated.

Upvotes: 0

Views: 2548

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40244

If you want month first, then maybe you should specify it that way.

Mon-Year = FORMAT('table'[Date],"MMM-YYYY")

This may be useful for you:

https://learn.microsoft.com/en-us/dax/custom-date-and-time-formats-for-the-format-function

Upvotes: 1

Related Questions