Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a table from a query:
select employeeId, hours, intime from DW.dbo.payrollstuff
I have a Date Table defined as:
Solved! Go to Solution.
Hi @feelie75
I was just reading your last paragraph and you are mentioning Datetime columns. If the time portion is required, you'll have to make a copy of that column and change the copy to a type of Date to use in the relationship.
The reason for this is the relationship to the date table would only match columns with 00:00:00 since they would match the date column in the date table. (Columns with a time portion other than 00:00:00 wouldn't match in the relationship.)
I hope this makes sense.
Yep, that was the secret sauce, gmsamborn! I just changed my SQL query to: cast(intime as Date), and then it was able to match.
I didn't know that a relationship between two tables ignored the "Formatting" when I changed it to Date. That apparently ONLY changes the formatting, but the data itself still remained date/time, so the join was only happening on the 00:00:00 payroll entries.
Changing the query to cast the value as date forced ALL entries to have 00:00:00 as their time component, and thus the relationship join now works!
Or changing the type in the column to Date as you recommended would also work. Thanks for leading me down and confirming that. Cheers!
Glad that helped. (I've seen that more than a couple of times.)
Hi @feelie75
I was just reading your last paragraph and you are mentioning Datetime columns. If the time portion is required, you'll have to make a copy of that column and change the copy to a type of Date to use in the relationship.
The reason for this is the relationship to the date table would only match columns with 00:00:00 since they would match the date column in the date table. (Columns with a time portion other than 00:00:00 wouldn't match in the relationship.)
I hope this makes sense.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
50 | |
38 | |
38 |
User | Count |
---|---|
195 | |
80 | |
70 | |
51 | |
42 |