March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
This issue relates to the dax Date() function.
It's giving wrong values in visuals e.g. a table visual for dates in October 2017, BUT is correct for all other dates AND/BUT shows semi correct data in the table data view.
I'm using the date function in the context of this dynamic filter http://radacad.com/dynamic-date-range-from-slicer by @Phil_Seamark .
Thats the context of the use of the function. The dynamic filter works great. Then by chance I stumbled on these erroneous dates.
It was driving me bonkers and thought it was my data or some filtering I wasn't seeing. But I've now replicated the error in a separate power bi file with none of the dynamic filter setup added and generic series generated dates.
The filter in Phils post requires a calculated date column consisting of the first day in the month in which the reference date occurs.
As discussed in Phils post a table of generic dates is generated with
ADDCOLUMNS( GENERATE( CALENDAR("2012-01-01",TODAY()) , SELECTCOLUMNS(GENERATESERIES(1,2),"Units Sold",RANDBETWEEN(1,5)) ), "Month" , DATE(YEAR([Date]),MONTH([Date]),1))
resulting in data like
BUT !!
out of all the data in this series dates that are in October 2017 are giving the wrong Month column values in visuals.
There's two errors.
1. The first day of october in the generated series is showing 30/09/17 instead of 01/10/17. But then the series contiues correctly from 02/10/17 onwards
2. The calculated Month that should be 01/01/17 is also showing 30/09/17 for all remaining dates in october 2017. Then contiues correctly from 01/11/17 onwards. see below.
it's good for ALL !! dates prior... then for october gives the error....
Then goes back to correct value in november
BUT the data is partially correct in the table view of data.
A spurious / duplicate series value of 30/09/17 is addded. But the calculated Month date is correct.
If others can replicate this would be great.
Can anyone figure out the cause ??
My best guess is a date function error with the number of days in the month of September or October 2017
But is there some simple thing I've missed ?
Cheers
Simon
Hi @Anonymous
Based on my test, I cannot reproduce the same issue as you said . You may try to check if it has any filters. If it is not your case, please share your file. You can upload it to OneDrive or Dropbox and post the link here.
Regards,
Cherie
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |