Forum Discussion
Use Slicer value as Variable
- Anonymous7 years ago
Yes, I thought it wasn't possible because PowerBI can't really handle user input data. Even though it has problems, at least it's possible
Yeah, this is possible. I've used it as a janky way to set up input variables on a report before. The trick is using SELECTEDVALUE to get one value out of a list of values.
You have to explicity declare all the values that the SLICER value can be, but it works. If you wanted to get a percentage of a value in Table1 with a slicer you could do the following:
Create a table of values 0-100 called "SlicerValues". Create a slicer that slices SlicerValues[value]. Create a measure or calculated column in Table1 as appropriate with code like:
Portion of Data = Table1[Value]*SELECTEDVALUE(SlicerValues[value])/100
This has limitations, like the slicer only has whatever range you set as available, but gets the job done.
Thanks Cmcmahan this is same what i am doing but is it possible to get more than 1 value is stored and used in measure. I have explained in below thread if you can provide some input that will be very helpful.
Regards