Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a 3 tables with dates in each tables so I created a table just for DATE with this DAX code
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Best practice is to create a calendar table containing all dates from the start of the year of the first date in all fact tables to the end of the year of the last date in all fact tables. Personally I never create date tables in DAX. You can copy my power query table from here
https://exceleratorbi.com.au/build-reusable-calendar-table-power-query/
and read about calendar tables here https://exceleratorbi.com.au/power-pivot-calendar-tables/
I solved.
Issue was that the Date in the other table had also time inside so I removed the time and remain only day and year.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |
DimDate_DAX = ADDCOLUMNS ( CALENDAR("2017-01-01",TODAY()), "Year", Year([Date]), "Quarter", CONCATENATE("Q",ROUNDUP(MONTH([Date])/3,0)), "Month", MONTH([Date]), "MonthName", FORMAT([Date],"MMMM"), "WeekNumber", WEEKNUM([Date]), "WeekDay",WEEKDAY([Date]), "Day", DAY([Date]), "DayName", FORMAT([Date],"DDDD") )