Forum Discussion
Single select slicer
- 3 months ago
I have a table called *Dim_Country with only country names.
Then I have another table Global Data with all data including Region , Country name and values of total consumption.On the page I have slicer, single select which selects one country for example France and shows all data related to France on every chart.
I want to show where France is in relation to other countries in the same region, Europe, based on the Consumption. SO I want to have all counties in Europe including France. This is the only chart that shows any other countries.
Step 1) Create a disconnected selector table
No relationship to anything. Use this as your slicer instead of Dim_country[Country].
CountrySelector =
DISTINCT (
SELECTCOLUMNS ( Dim_country, "Selected Country", Dim_country[Country] )
)
Step 2) Update the measure
Region Total =
VAR _SelectedCountry =
SELECTEDVALUE ( CountrySelector[Selected Country] )
VAR _SelectedRegion =
CALCULATE (
SELECTEDVALUE ( Dim_country[Region] ),
Dim_country[Country] = _SelectedCountry
)
RETURN
CALCULATE (
[Your Measure],
REMOVEFILTERS ( Dim_country[Country] ),
Dim_country[Region] = _SelectedRegion
)
Hello, If I make another slicer for Country then I have two on one page.