Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello, I have a problem where formula's work on one machine but not on the other. I've made a template file which my company can use as a base fro reporting, this file contains a calendar created with a formula:
Kalender =
GENERATE (
CALENDAR ( DATE ( 2020; 1; 1 ); today() );
VAR currentDay = [Date]
VAR weekday = WEEKDAY( currentDay; 2 )
VAR week = WEEKNUM( currentDay )
VAR day = DAY( currentDay )
VAR month = MONTH ( currentDay )
VAR year = YEAR ( currentDay )
RETURN ROW (
"dag"; day;
"weekdagnummer"; weekday;
"weekdag"; switch(weekday;
1; "maandag";
2; "dinsdag";
3; "woensdag";
4; "donderdag";
5; "vrijdag";
6; "zaterdag";
7; "zondag");
"week"; week;
"maandnummer"; month;
"maand"; switch(month;
1; "januari";
2; "februari";
3; "maart";
4; "april";
5; "mei";
6; "juni";
7; "juli";
8; "augusutus";
9; "september";
10; "oktober";
11; "november";
12; "december");
"jaar"; year )
)
On the machine where I've created this it works perfectly, when I save the pbix and open it on my laptop (different machine)
the semicolons are replaced with comma's and the date formula doesn't work anymore, it's replaced with DATE ( 2020, 1, 1 ), the ones get underlined in red and the errror says: unexpected expression '1,'.
Same goes for the switch cases inside the formula's where the switch recognizes the values but not the results, i've tried putting the results in either double or single quotes but to no avail. Can somebody please explain me what's going on and how to make this formula work on any machine?
Solved! Go to Solution.
Hi @erceve ,
This really looks a strange issue. Can you check your separator settings on your machine under Regional settings?
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |