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.
Hello everyone,
How can I add the year week to the date hierarchy?
Sorry I'm amaterur.
Solved! Go to Solution.
@GerardContlx Make sure you mark your Date table as a Date table - see my blog here on how to do that: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Once you mark it as a date table, that date hierarchy will disappear. You'll then need to re-create it manually and can add Week and any other fields you want to it:
https://radacad.com/what-a-power-bi-hierarchy-is-and-how-to-use-it
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
You need to build a custom date table.
https://www.sqlbi.com/articles/creating-a-simpler-and-chart-friendly-date-table-in-power-bi/
Something a long lines of the above but with an extra line which produces a week number:
https://docs.microsoft.com/en-us/dax/weeknum-function-dax
You can then relate the table to your date field to create your hierachy.
I don´t know hay can I upload the file.
@GerardContlx Make sure you mark your Date table as a Date table - see my blog here on how to do that: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Once you mark it as a date table, that date hierarchy will disappear. You'll then need to re-create it manually and can add Week and any other fields you want to it:
https://radacad.com/what-a-power-bi-hierarchy-is-and-how-to-use-it
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |