March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello, I have the following DAX code that returns a single value like "St. Louis". The intent is to fill a card visualization with the values.
_M_AgencyName =
VAR crazyStuff = SELECTEDVALUE(Office[Agency Name], blank())
RETURN
SWITCH(crazyStuff,
"St.Louis", "St. Louis",
"Omaha", "Omaha",
"Kansas City", "Kansas City",
"Phoenix", "Phoenix",
"Chicago", "Chicago",
Blank(), "All"
)
But what if there is more than one value selected in the slicer? I just want the text, something like "Chicago, St. Louis, Omaha" if that's what is selected. So I tried this code, but it didn't work. All the other posts I have found are not helpful.
_M both =
VAR allofthem = ALLSELECTED(Office[Agency Name])
RETURN allofthem
Thanks!
Solved! Go to Solution.
Try:
Selected locations =
VAR _Selected =
CONCATENATEX (
VALUES ( 'Slicer table'[Location] ),
'Slicer table'[Location],
", "
)
RETURN
"Selected Location(s): " & _Selected
Proud to be a Super User!
Paul on Linkedin.
Try:
Selected locations =
VAR _Selected =
CONCATENATEX (
VALUES ( 'Slicer table'[Location] ),
'Slicer table'[Location],
", "
)
RETURN
"Selected Location(s): " & _Selected
Proud to be a Super User!
Paul on Linkedin.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |