Recently I was creating a parameter in Power BI Desktop and had it configured something like this:
I didn’t bother to choose anything in the Default Value dropdown box, and when I looked at the code for the parameter in the Advanced Editor I saw this:
"a" meta [IsParameterQuery=true, List={"a", "b", "c"}, DefaultValue=..., Type="Text", IsParameterQueryRequired=true]
I was interested to know what the ellipsis symbol (three dots …) in the DefaultValue field in the record meant, and looking in the Language Reference I found that in M it can be used for two purposes: as an open record marker (maybe something for a future blog post) and, as in this case, as a quick way of returning an error. The language reference says that it is directly equivalent to the following expression, which returns a “Not Implemented” error:
error Error.Record("Expression.Error", "Not Implemented")
But from what I can see, it actually returns a “Value was not specified” error instead. Here’s another example of how it can be used in a function definition, and what it returns:
let MyFunction = (x,y) => if x>y then true else ..., Output = MyFunction(0,1) in Output
It’s not something I think I’ll be using in my own code, but it’s good to know what it means!