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.
Hi guys,
we are trying to get the values selected in a given slicer. Idealy, we would like to return it as a text format. For instance, we have a slicer with the values:
A [ ]
B [X]
C [X]
Would be possible to return something like "BC".
Thank you,
M
Solved! Go to Solution.
Hi Mik,
It should be a measure rather than a calculated column. Please try it. The calculated column won't respond to the slicer for now.
Best Regards,
Dale
Hi @mikmokmuk,
Please try the formula below.
//if there isn't any selection, this formula will return all the values. So ISFILTERD is here.
SelectedInSlicer = IF ( ISFILTERED ( DimProduct[ColorName] ), CONCATENATEX ( VALUES ( DimProduct[ColorName] ), [ColorName], "-" ) )
Best Regards,
Dale
Hi Dale,
thank you for your reply. We have tried your suggested formula and is not working, see screenshot. I have attached a sample of out pbix file here in dropbox. Would you mind to take a look into?
https://www.dropbox.com/s/eef2twfw72gp1gt/EXERCISE.pbix?dl=0
Many thanks,
Mik
Hi Mik,
It should be a measure rather than a calculated column. Please try it. The calculated column won't respond to the slicer for now.
Best Regards,
Dale
In addition to the solution provided by @v-jiascu-msft
Look at my solution here...
It includes the above but can also give you some ideas on how you can modify the Measure further.
One thing you may consider is limiting how many items you list in the Card Visual before you say “Multiple”
Hope this helps!
I successfully created a measure that returns the value selected in the slicer - thank you! but now, I'd like to use this measure to calculate a column with the expression "If ('Table'[Year} <= ValueSelectedInSlicer, "Reached Phase","Did Not Reach Phase") for all rows. But someone mentioned this earlier, that we cannot use the measure that returns the value selected in the slicer in a column. Is there an alternative way to execute what I'm describing?
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 |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |