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.
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.
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)
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.
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: –
Addend Analytics is a Microsoft Gold Partner based in Mumbai, India, and a branch office in the U.S. Addend has successfully implemented 100+ Microsoft Power BI and Business Central projects for 100+ clients across sectors like Financial Services, Banking, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Switzerland, and Australia. Get a free consultation now by emailing us at firstname.lastname@example.org or Contact us.