Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all,
my sales table is like in this image
I created a date table using this code:
Calendar = CALENDAR(FIRSTDATE(Invoices[InvoiceDate]), LASTDATE(Invoices[InvoiceDate]))
but it returned the following error
A date column containing duplicate dates was specified in the call to function 'FIRSTDATE'. This is not supported.
I suspect the error occured because there are duplicates like 01/02/2010 00:00:00, for all those record with no time stamp.
So, I used this code instead to create the calendar table:
Calendar = CALENDAR(MINX(Invoices,Invoices[InvoiceDate]),MAXX(Invoices,Invoices[InvoiceDate]))
That created the table, as follows:
All timestamps are set to 00:00:00
I then established the relationship from the Invoices table to the Calendar table, with Many (invoices) to One date and Single Cross Filter.
However, reports are inconsistent. For example, there are not data for 2017, 2018 and 2019.
I suspect this issue is caused by the time stamp. Those sales records where the date includes the time stamp will not find any corresponding value in the Calendar table, because 05/05/2019 11:37:43 is different from 05/05/2019 00:00:00
If that is the issue, what would be the solution? Create a new column in the sales table, with the date but without time stamp and then generate the Calendar based on values in this new column?
Hope I am clear, tnx.
Solved! Go to Solution.
That was the issue, indeed.
The calendar table records were all like 05/05/2019 00:00:00
Whereas the sales table records were 05/05/2019 14:30:59
And therefore, the sales table would not find any corresponding date in the calendar table.
I added a calculated column to the sales table, as described in this solution, and it all started working.
That was the issue, indeed.
The calendar table records were all like 05/05/2019 00:00:00
Whereas the sales table records were 05/05/2019 14:30:59
And therefore, the sales table would not find any corresponding date in the calendar table.
I added a calculated column to the sales table, as described in this solution, and it all started working.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
87 | |
78 | |
62 | |
61 | |
60 |
User | Count |
---|---|
160 | |
114 | |
100 | |
74 | |
65 |