How to use a shotgun to kill a fly?
Or Dynamic M parameters are out of preview and a small example
Dynamic M parameters are not a preview feature in Power BI
As of the April version, dynamic M parameters are not a preview anymore.
I wanted to show a really simple example of using dynamic parameters that was suggested by a creative user with some improvements by me.
What is the problem solved by dynamic parameters in this case?
The user is creating an application in which he wants to embed Power BI.
The same Power BI report will be used in different contexts and the user wanted to have a different header each time and to provide the header as part of the URL.
There may be other ways to solve this problem(?) but as the solution was already using ADX, the user came with a way that involves Direct Query and a dynamic parameter to solve the dynamic header.
Steps
In the attached file, you see two tables.
The BringValue table is running a KQL query.
The query is is arguable the simplest query you can run in KQL :
print Value=’Value’
The query returns a table with one row and one column called Value.
The value is provided by a Power Query parameter bound to the column value in the table Values
How to feed an arbitrary value
We can push an arbitrary value into the Value column from the filters pane
The value doesn’t need to exist in the table.
Regular filtering on a non-existing value will cause a blank value to be selected.
In the case of binding a column to a parameter, non-existing values can be pushed.
The same effect can be achieved by adding ?filter=Values/value eq ‘New Value’ to the URL in the Power BI service.