Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.