Difference between DAX and excel Dates

jak82

Board Regular
Joined
Apr 28, 2016
Messages
146
Hi,

For some reason when I use

Code:
=TEXT([@PublicationDate], "dddd")
Against 26/06/2017 in a table it brings in Monday which is correct.

However if I use
Code:
=FORMAT(DAY('Calendar'[Date]),"dddd")
Against 26/06/2017 in a Table column in PowerPivot it brings in Thursday?

??? Any ideas whats going on?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Remove the DAY function from the DAX version.
 
Upvote 0
Day(26/06/2017) would return 26. You then try and format 26 as a day name. Since Excel and DAX treat dates as a number of days after 31/12/1899, you’re actually returning the day name for 26 Jan 1900.
 
Upvote 0
Day(26/06/2017) would return 26. You then try and format 26 as a day name. Since Excel and DAX treat dates as a number of days after 31/12/1899, you’re actually returning the day name for 26 Jan 1900.

Cool, Thanks
 
Upvote 0
Glad to help.

You would have had the same problem had your Excel formula been:

=TEXT(DAY([@PublicationDate]), "dddd")
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top