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
I use DAX function: GetWeekDay = WEEKDAY(WEEKDAY([DropOffTimeLocal].[Date],2)) to get the weekday value. Apparently, it has different result for the same day. for the same March 3, 2017 and March 10, 2017. the weekday function return 2 different values. wheres it is a Friday (value 5), instead some of them return Saturday (value 6)
Is it a bug in function or not ?
Thanks a lot for your response..
Solved! Go to Solution.
Hi @handrianto,
I notice that the date place in the table visual is [PickUpTimeLocal], while the GetWeekDay = WEEKDAY([DropOffTimeLocal].[Date],2).
And I also find there are records [PickUpTimeLocal] date is not equal to the [DropOffTimeLocal] date. As you compare the [PickUpTimeLocal] date with the weekday value from the [DropOffTimeLocal], the result you get is expected.
Best Regards,
Qiuyun Yu
Hi @handrianto,
I notice that the date place in the table visual is [PickUpTimeLocal], while the GetWeekDay = WEEKDAY([DropOffTimeLocal].[Date],2).
And I also find there are records [PickUpTimeLocal] date is not equal to the [DropOffTimeLocal] date. As you compare the [PickUpTimeLocal] date with the weekday value from the [DropOffTimeLocal], the result you get is expected.
Best Regards,
Qiuyun Yu
Ah.. How can I do such silly mistake.. I copy paste the DAX from other BI report and forgot to change the column reference from droptime into pickuptime. didn't catch that for 2 days.
Thank you very much for your help Quiyu..
Hi Qiuyun Yu, Thanks for the response. I've already update PBI Desktop to the latest update May 2017. I've corrected the DAX function (silly me) as you suggest. GetWeekDay = WEEKDAY([DropOffTimeLocal].[Date],2). but apparently after re-run the function and I checked the table test result; it is still the same.
in fact now I notice it is randomly occur in other dates.
Hi @handrianto,
In your scenario, please remove the one WeekDay() function and keep only one like below:
GetWeekDay = WEEKDAY(WEEKDAY([Date].[Date],2))
Also please try to run the desktop version latest one 2.46.4732.721 64-bit (May 2017). If issue persists, please share .pbix file if possible.
Best Regards,
Qiuyun Yu
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 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |