Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am wanting to use something like a 'what if' parameter that allows the user to select between a few countries such as:
China, India, USA etc.
However, when I go to create a 'what if parameter' it only allows for a numerical data type, it does not allow you to use words, or to insert a list of words, that the user can choose from. Can this be achieved somehow?
It is important that the selected word/country can be accessed within a python visualization script. I note that instead of using a 'what if parameter' you can create a slicer from the visualization pane and add the appropriate column of the data set (containing the countries/words to choose from) within the slicer's field. This allows the user to choose from a list of countries. However, this solution does not appear acceptable as it doesnt appear that you can access the chosen value of the slicer within a python visualization script.
So the question is: Is anyone able to tell me whether you can use a selection of words as the options to pick from, within a 'what if parameter', or if not, instead, is there a way to access the selected option of a slicer, within a python visualization script? Otherwise, is there some other way to achieve the same result (allow the user to pick from a number of word options and have the selected value accessible within a pythopn visualization script)?
Solved! Go to Solution.
as it doesnt appear that you can access the chosen value of the slicer within a python visualization script.
You can make it work by using the exact same field in both the slicer and the python visual.
Yes. The word you are looking for is Filter Context.
as it doesnt appear that you can access the chosen value of the slicer within a python visualization script.
You can make it work by using the exact same field in both the slicer and the python visual.
@lbendlinBy the same field, do you mean the column that the slicer is based. If I add this column to 'values' in the python visual, will this mean that I will have access to the chosen value of the slicer rather than the column itself (this is what I want)?
User | Count |
---|---|
96 | |
87 | |
78 | |
72 | |
68 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |