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.
Tengo un par de tablas con fechas en cada tabla, así que creé una tabla solo para FECHA con este código DAX
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
La práctica recomendada es crear una tabla de calendario que contenga todas las fechas desde el inicio del año de la primera fecha en todas las tablas de hechos hasta el final del año de la última fecha en todas las tablas de hechos. Personalmente nunca creo tablas de fechas en DAX. Puede copiar mi tabla de consulta de energía desde aquí
https://exceleratorbi.com.au/build-reusable-calendar-table-power-query/
y leer acerca de las tablas de calendario aquí https://exceleratorbi.com.au/power-pivot-calendar-tables/
Lo resolví.
El problema era que la fecha en la otra tabla también tenía tiempo dentro, así que quité la hora y permanecer sólo día y año.
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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
DimDate_DAX - ADDCOLUMNS ( CALENDAR("2017-01-01",TODAY()), "Año", Año([Fecha]), "Quarter", CONCATENATE("Q",ROUNDUP(MONTH([Date])/3,0)), "Mes", MES([Fecha]), "MonthName", FORMAT([Date],"MMMM"), "WeekNumber", WEEKNUM([Date]), "WeekDay",WEEKDAY([Fecha]), "Día", DIA([Fecha]), "DayName", FORMAT([Date],"DDDD") )