In this blog, we will be showing multiple slicer selections in a card or text box in Power BI.
We’ll be adding two slicers containing ShipCountry and ShipCity, and a text box that will be showing the selected name in the slicer.
Example
Step: 01
We have two slicers, a text box, and a card. The text box and a card will show us the values we will select in our slicers.
Step: 02
We need to first create a measure to show the selected slicer values in the text box and a card. Below is the measure: –
Multi-Slicer Selection =
Var a = “Country : ” &SELECTEDVALUE(Orders[ShipCountry],”All Country”)
var b = “City : “& SELECTEDVALUE(Orders[ShipCity],”All City”)
var c= UNICHAR(10)
return
a & c & b
Var a will be showing the selected value in Slicer 01 i.e., ShipCountry.
Var b will be showing the selected value in Slicer 02 i.e., ShipCity.
Var c is using the UNICHAR function which returns the Unicode character referenced by the numeric value. Its syntax is UNICHAR(number). It will be showing the value of two slicers in different rows.
Step: 03
As we’ll be using the measure in the text box to show the value. Below are the steps to add dynamic value in a text box: –
- Click on the text box in which you need to add the measure.
- A dialog box will appear. Select ‘Value’ in it. Then, it will give to option to create a dynamic value.
- Add your measure in it and save the changes you made.
Below is the snapshot of how we can add a measure to a text box: –
MITISHA SONI
DATA ANALYST
ADDEND ANALYTICS