Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello there,
I have a slicer with 5 options: Bing, Facebook, Google, NewTraffic and SteelHouse.
I am trying to get selected value from the slicer into a variable. I am able to get it correctly if there is only one of these selected. However, if i select Bing and Google, i cant get it to work.
In order to do the test i created a measure and presented it in a "Card" visual. The measure looks like this:
Solved! Go to Solution.
Hi @slav84 ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure =
var _selelct=SELECTCOLUMNS('PlanDataSources',"select",[DataSource])
return
CALCULATE(
SUM('PlanDataSources'[RevenuePlan]),FILTER(ALL(PlanDataSources),
'PlanDataSources'[DataSource] in _selelct))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @slav84 ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure =
var _selelct=SELECTCOLUMNS('PlanDataSources',"select",[DataSource])
return
CALCULATE(
SUM('PlanDataSources'[RevenuePlan]),FILTER(ALL(PlanDataSources),
'PlanDataSources'[DataSource] in _selelct))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@slav84 , For the first one try like
SlicerTest =
VAR SELECTION = concatenatex(SlicerOptions, SlicerOptions[DataSource], ", ")
return SELECTION
For second
Actually that doesnt work.
The solution for :
SlicerTest =
VAR SELECTION = concatenatex(SlicerOptions, SlicerOptions[DataSource], ", ")
return SELECTION
Is fine.
However,
When i try to pass this selection down to my switch function or your second solution it didnt work.
It does not recognise SELECTION within
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |