Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Let’s say we have two slicers:
And we want to dynamically display the selected values from both slicers inside a text box or card.
Add two slicers to your report:
Add a card and a text box that will display the selected values.
Create a new measure in your model with the following code:
Multi-Slicer Selection =
VAR a = "Country: " & SELECTEDVALUE(Orders[ShipCountry], "All Country")
VAR b = "City: " & SELECTEDVALUE(Orders[ShipCity], "All City")
VAR c = UNICHAR(10) -- Adds a line break
RETURN
a & c & b
Power BI now allows dynamic values in text boxes! Here’s how:
You’ll now see the selected slicer values update dynamically based on user interaction.
If ShipCountry = Canada and ShipCity = Toronto, the output in the text box/card will be:
If no value is selected, it’ll show:
Regards
Anmol Malviya
Sr. Data Analyst | Addend Analytics
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.