问题
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.
Should I create different calculated fields for year and month separately and then concatenate it? any help would be appreciated.
回答1:
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://docs.microsoft.com/en-us/dax/custom-date-and-time-formats-for-the-format-function
来源:https://stackoverflow.com/questions/61763328/dax-and-format-function