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.
I have this code excerpt:
GetPlanningItemChangeMarkersData = (environmentName as text, planningItemId as number) as record =>
which appears to behave the same way as:
GetPlanningItemChangeMarkersData = (environmentName, planningItemId) =>
Are either of these better practice than the other? I could see an argument that it's much quicker to see what GetPlanningItemChangeMarkersData will return if I leave the "as record" declaration in there, but environmentName and planningItemId are obviously going to be text and a number, so surely I could leave them out?
Currently I'm going to go with
GetPlanningItemChangeMarkersData = (environmentName, planningItemId) as record =>
, but I'd love to hear the community opinions on this.
TIA.
Solved! Go to Solution.
Its possible that not putting "as" could lead to the column being identified as either text or whole number which will be indicated by the top of the column showing "abc/123"
This could lead to additional applied steps to be made if you have to change it specifically to text or whole number. My opinion is best practice would be to put "as" wherever a specific data type is needed.
Its possible that not putting "as" could lead to the column being identified as either text or whole number which will be indicated by the top of the column showing "abc/123"
This could lead to additional applied steps to be made if you have to change it specifically to text or whole number. My opinion is best practice would be to put "as" wherever a specific data type is needed.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |