Forum Discussion
Edit Variables as Slicer or dropdown for the user
- Anonymous8 years ago
Anonymous,
You have created a parameter named Unit, and define some values for it , right? If so, change {Cube.ApplyParameter,"UNIT",{'"&Unit&"'}} to the following:
{Cube.ApplyParameter,"UNIT",{""&Unit&""}}
Regards,
Lydia
Anonymous,
Do you create parameters in Query Editor of Power BI Desktop? If so, do you use the paramter to filter your source or rows in your table? If you use the parameter to filter the rows, you may create measure instead. Please share sample data of your table and post expected result based on sample data here.
In addition , when you create parameter in Power BI Desktop, currently it is not possible to change the values of the parameter after publishing report to Power BI Service.
Regards,
Lydia
- Anonymous8 years agoNot applicable
Thankyou for your response v-yuezhe-msft :)
I am not using Parameters. I am using Variables which appear by default when i connect with HANA Views in Direct Query mode as these variables are present in HANA Views.
When i click on edit variables , this variable window opens. I can change values of the variables from here.
My question is if we can make these variables available to user on the report itself as a list , slicer or dropdown for ease of use and so that when i publish my report to service these variables are available to user for changing values.
Power BI User
- Anonymous8 years agoNot applicable
Anonymous,
You would need to create parameters in Query Editor of Power BI Desktop for these variables, then apply these parameters into M code of your Query. This way, you can edit parameter values in dropdown list in Report view of Power BI Desktop, and you are able to change the parameter in Settings of Power BI Service.
There is an example for your reference.
Regards,
Lydia- Anonymous8 years agoNot applicable
Hi Lydia,
Thankyou for your response :)
Since my dataset is huge i can't use import mode, i am using Direct Query Mode.
In direct query mode edit parameters option (Create Parameters) is disabled.
Although let me try using import mode if passing values to HANA variables is possible through parameters.
When i use import mode , we need to pass values to HANA View Variables to import Data.Therefore it generates the Mquery according to that.
Unit , Time_Frame and Material are HANA View Variables . Fro example 'kboe' is a value i passed to Unit variable to import data.I want to create a parameter for it , so i used :
{Cube.ApplyParameter,"UNIT",{'"&Unit&"'}}
where Unit is a Parameter.
It also does not seem to work for me.It does not do anything.
Please suggest
Regards
Kanika Jain