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.
Hi Expert
I have 2 tables for different date format and would like to link with calendar table
Table1
Date Data
Tuesday, May, 5, 2020 100
Monday, May, 4, 2020 200
...
...
...
Table2
Date Data
202005 100
202004 200
202003 300
202002 400
Calendar Table
multiple dimension date format
question: can I have link relationship with two table based on different format date? thanks
Hi @yuhkao ,
Based on my test, the column that related in the relationship should be the same data type even though they are in different format.
But in your Table2, the Date column is whole number type and it cannot be converted to the date type(or be converted to the wrong date). You should check for it first.
Best Regards,
Dedmon Dai
Both data type and format should match to use relationships. I always create a DateKey to use as my relationship linkage between tables. You can do this in the Query Editor by adding a custom column and using the formula:
=Date.ToText([Date], "YYYYMMdd")
For your Table 2 you may have to do a bit more cleansing to convert it into a date data type first.
Has this post solved your problem? Please mark it as a 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.
I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query.
https://sites.google.com/site/allisonkennedycv
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 |