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.
Hi Ania26
Not sure if you have the value of the chart taking into consideration the region or the country. you may need to change the filter context of your calculations something similar to this:
Region Total =
VAR RegionSelected = SELECTEDVALUE(Country[Region])
Return
CALCULATE(
[Your Measure],
REMOVEFILTER(Country[Country]),
Country[Region] = RegionSelected
)
Be aware that this is just a sample DAX that may need to be updated based on your model.
- Ania263 months agoHelper IV
Hello,
This does not work. I have tried many different measures and still cannot solve this.- MFelix3 months agoSuper User
Hi Ania26 ,
How do you have your visual setup, and also the country / region are they in the same table are they part of the a dimension table or a fact table?
I have made a small example has you can see belowe if I select a country the bar charts gets the total value of the region:
My measure is:
Total Sales Group = VAR SalesGroup = SELECTEDVALUE('Sales Territory'[Group]) Return CALCULATE( [Total Sales], REMOVEFILTERS('Sales Territory'[Name]), 'Sales Territory'[Group] = SalesGroup)Can you please give some more details so I can check what is the best approach.
- Ania263 months agoHelper IV
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.