Forum Discussion
Potential bug with date() ?
- 2 years ago
I have the weirdest fix for this ... switch back the regional settings in PBI to the default.
A little annoying, but trying to figure out and fix what PBI messes up in the background is way worse.
Hi zahlenschubser ,
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Can you please try this one? https://we.tl/t-D7938k4lHn
Try to edit the code in one of the calculated columns, then it should show a date result, but as soon as you save it flips back to the DATE() syntax error.
- MFelix2 years agoSuper User
Hi zahlenschubser
When I opened the file there were a couple of errors because of dots instead of commas on the formula not sure if this is happening also to you but please see then image below:After replacing this by commas everything worked properly even after saving, opening and reopening.
- zahlenschubser2 years agoHelper IV
That's because command separators are set to comma in the regional settings.
I changed something in the formula and back and let it calculate and got a result
But as soon as I save it bugs out again
It doesn't even show me any errors in the code / code window, just the cryptic message on the bottom. - zahlenschubser2 years agoHelper IV
What confuses me in your screenshots is that PBI seems to have replaced only a part of the separators with dots, not all of them. If that's what goes on in the background on saving it's no wonder it bugs out.
- MFelix2 years agoSuper User
Hi zahlenschubser ,
I have to be honest in the past (2017/2018) this would happen when we had a computer with regional settings and got a file with different regional settings and then DAX editor would become "confused". We even got problems when copying formulas to the forum because some people got the decimal separator has comma or has dot.
Since they added the functionality for the regional settings and the DAX defnitions I never seen this again. I know this will sound stupid but can you try and replace the dots by comma but be sure to add a space after the comma:
if you have 6.7 you should go to 6, 7See if that picks up the correct values or goes back to giving you errors.