Forum Discussion
Date calculations are all US based.
Hi designertechno,
Power BI always sees your date value in the mm/dd/yyyy format
If your dates are 01/01/2018 and 10/01/2018, they are seen as Jan 1st, 2018 and Oct 1st, 2018 and hence the DateDIFF is 273. The Code is below
Measure 2 = DATEDIFF("01/01/2018", "10/01/2018", DAY) Measure 2 Output is 273 Days
Where as when your dates are 01/01/2018 and 01/10/2018 they are understood as Jan 1st, 2018 and Jan 10th, 2018, thereby giving the DATEDIFF as 9 days. The Code follows
Measure = DATEDIFF("01/01/2018", "01/10/2018", DAY) Measure Output is 9 Days
As you said, Power BI date are read with US locale.
To change the locale setting in your PBI Desktop, do the following (This applies only to the current file, as this is a current file level setting)
1. Go to File
2. Options and settings -> Options -> Regional Settings
PFB the screenshotLocale
But as far as I know this will not work when you publish the report to PBI Service.
Just check with your Administrator if there is any locale settings at your tenant level. But this will change the locale for all the reports and PBI Service. So think before proceeding with this.
Speaking about your system local changes, I think You definitely can't ask all your users to change their system locale.
Alternatively, an easy workaround is Convert your dates to US date format of mm/dd/yyyy
Happy DAXing..:)