I'm getting a weird error in Power BI Desktop. I'm trying to add a Date table from this site: https://www.sqlbi.com
However, I am not able to generate the Calendar table because my commas are being seen as periods. I have deleted the relevant parts and typed it in myself, and some commas are being seen as periods, and others as commas. However, of course it doesn't work. In this screenshot I've added extra arguments to show how it looks in the error message.
Based on my test, it could work on my side:
CALENDAR 4 = VAR BASECALENDAR = CALENDAR ( DATE ( 2016, 1, 1 ), DATE ( 2018, 12, 31 ) ) VAR RENAMEDCALENDAR = SELECTCOLUMNS ( BASECALENDAR, "CALENDAR[DATE]", [DATE] ) VAR CALENDAR_1 = SELECTCOLUMNS ( RENAMEDCALENDAR, "DATE", 'CALENDAR'[DATE], "YEAR", YEAR ( CALENDAR[DATE] ), "MONTH NUMBER", MONTH ( CALENDAR[DATE] ), "MONTH", FORMAT ( CALENDAR[DATE], "MMMM" ), "YEAR MONTH", FORMAT ( CALENDAR[DATE], "MMM YY" ) ) VAR CALENDAR_2 = ADDCOLUMNS ( CALENDAR_1, "YEAR MONTH NUMBER", [YEAR] * 12 + [MONTH NUMBER] - 1 ) RETURN CALENDAR_2
It seems that the data format in your formula is not correct, you could check the picture below:
You could also download the pbix filet to have a view.
Hi Daniel, I believe it could be something to do with regional settings since I'm in Germany but my Power BI installation is set to English. Could it be?
As you can see in the Snip, my commas aren't being detected correctly. Some commas are detected as periods, some as commas.
I know this is an older post but I thought I'd comment to say this is happening to me as well.
I'm based in the Netherlands and my PC regional settings for "Regional Format" are set to English (Netherlands). Find it in Settings -> Time & Language -> Region
This is causing single commas to sometimes be converted to period/full stops as below:
To work around this I can write two commas instead:
I saw that the input could be in the form of a string so I side-stepped the problem here.
I'm hesitant to mark this as solved since the fundamental issue is still a mystery to me, but it works for this particular instance of the problem.
I could not reproduce your problem and withe the formula you mentioned also could work.
if your problem could be solved, could you please mark the helpful replies as Answered?
Check out new user group experience and if you are a leader please create your group!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Check out how to claim yours today!
Test your skills now with the Cloud Skills Challenge.