default value
2 TopicsDefault values for field parameter with language support?
I've got a field parameter to which I've added language support using the method describere here: Synchronize multiple field parameters - Power BI | Microsoft Learn _p_location_resolution = { //english ("region", NAMEOF('dim terminal'[region]), 0, 1), ("country", NAMEOF('dim terminal'[country]), 1, 1), ("city", NAMEOF('dim terminal'[city]), 2, 1), ("terminal", NAMEOF('dim terminal'[terminal]), 3, 1), //swedish ("region", NAMEOF('dim terminal'[region]), 0, 2), ("land", NAMEOF('dim terminal'[country]), 1, 2), ("stad", NAMEOF('dim terminal'[city]), 2, 2), ("terminal", NAMEOF('dim terminal'[terminal]), 3, 2), //spanish ("región", NAMEOF('dim terminal'[region]), 0, 3), ("país", NAMEOF('dim terminal'[country]), 1, 3), ("ciudad", NAMEOF('dim terminal'[city]), 2, 3), ("terminal", NAMEOF('dim terminal'[terminal]), 3, 3) } A problem with this is that if I add a language to my model but forget to update all field parameters there is no fallback. I use this field parameter in a slicer and If I filter for a language that is not supported by the field parameter the slicer becomes empty. My question is if it is possible to modify this in order to add a default definition? I tried letting ChatGPT be creative and it came up with this: _p_location_resolution = VAR SelectedLanguage = SELECTEDVALUE('languages'[ISO abbreviation], "en") RETURN SWITCH( SelectedLanguage, "en", { ("region", NAMEOF('dim terminal'[region]), 0, 1), ("country", NAMEOF('dim terminal'[country]), 1, 1), ("city", NAMEOF('dim terminal'[city]), 2, 1), ("terminal", NAMEOF('dim terminal'[terminal]), 3, 1) }, "sv", { ("region", NAMEOF('dim terminal'[region]), 0, 2), ("land", NAMEOF('dim terminal'[country]), 1, 2), ("stad", NAMEOF('dim terminal'[city]), 2, 2), ("terminal", NAMEOF('dim terminal'[terminal]), 3, 2) }, "se", { ("región", NAMEOF('dim terminal'[region]), 0, 3), ("país", NAMEOF('dim terminal'[country]), 1, 3), ("ciudad", NAMEOF('dim terminal'[city]), 2, 3), ("terminal", NAMEOF('dim terminal'[terminal]), 3, 3) }, // default to english { ("region", NAMEOF('dim terminal'[region]), 0, 1), ("country", NAMEOF('dim terminal'[country]), 1, 1), ("city", NAMEOF('dim terminal'[city]), 2, 1), ("terminal", NAMEOF('dim terminal'[terminal]), 3, 1) } ) But this gives the error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value". Unfortunately I'm too new to Power BI and DAX to determine if it's just a tiny fixable error or if I'm not allowed to write DAX code like this in a field parameter. I'm guessing that the field parameter definition is not reloaded when changing the language filter so it isn't possible to do something like this but hey, I got to ask.654Views0likes1CommentPBIR January 2023: Can't set "Default value" in browser since upgrade, just see empty drop down menu
Good day everyone, since upgrade Power BI Report Server to version January 2023 we can't set a "Defaul value" for a parameter using Edge via Web URL. We just see an empty drop down menu so we can't set a MDX value / query. Now we have to set the expression using Visual Studio which is not so easy. Is this a known bug? Kind regards633Views0likes0Comments