I want create a new table having distinct values from the column [Delivery Date Key] from the table Fact_Sale.
[Delivery Date Key] columns have below mentioned values
2013-01-12
2013-01-15
2013-04-19
2013-04-18
Now I want to create a new table having the below values, considering only year and month. Date will be hardcoded as 1. Because want to group sales by Month and Year and not date.. So the final rows of the new table will be
2013-01-01
2013-04-01
I am trying to use the below DAX query but it seems that DISTINCT does not accept year function:
Date1 = DISTINCT(date(year('Fact Sale'[Delivery Date Key]),month('Fact Sale'[Delivery Date Key]),1))
I have added the image of error also.. Is there another way to deal this situation. I am stuck since 3 days on it..