Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
yashdsin
Frequent Visitor

Filtering specific country from list of Country

Hi,

 

I my Data i have a list of countries from which i need to filter out a specific country such as @"Spain" from destination country. What options do i have? I want to show it on a graph in comparison with all countries.Data.PNG

1 ACCEPTED SOLUTION
ivancespedesl
Helper I
Helper I

Hi,

 

You can create all your graphs as if you will use all the data. Then, go to your variable "Country", click it and switch the visualization to a "Slicer". Afterwards, go to "Format" on the top of the page and then "Edit Interactions". You can choose which graphs to filter on the dashboard. That way you can have all your data from every other country and a set of visualizations dedicated to the country selected. 

View solution in original post

7 REPLIES 7
Robo
Frequent Visitor

Here you have an example, how to do it for your database. 

Assumption: Countries are listed in one column (like that)How to create country report with charts - data.jpgHow to create country report with charts.jpg

 

Link to this public report: https://coronadatasource.org/open-reports/general/cds-corona-covid-19-all-in-one-report/

if link not working, go to https://coronadatasource.org/ and click to open reports

yashdsin
Frequent Visitor

Many thanks for your kind help.

You're welcome

ivancespedesl
Helper I
Helper I

Another option is to use Calculate('Table'[Measure], 'Table'[Country_variable] == "Spain")

ivancespedesl
Helper I
Helper I

Hi,

 

You can create all your graphs as if you will use all the data. Then, go to your variable "Country", click it and switch the visualization to a "Slicer". Afterwards, go to "Format" on the top of the page and then "Edit Interactions". You can choose which graphs to filter on the dashboard. That way you can have all your data from every other country and a set of visualizations dedicated to the country selected. 

v-juanli-msft
Community Support
Community Support

Hi @yashdsin 

Create a new table which has no relationship with other tables.

country list = VALUES(Table1[destination])

Add [destination] in a slicer.

 

Create measures in Table1

Measure = CALCULATE(MAX('country list'[destination]),USERELATIONSHIP(Table1[destination],'country list'[destination]))

Measure 2 = IF(MAX(Table1[destination])=[Measure],1,0)

Add [Measure 2] in the visual level filter, so the table would only show rows for the specific country.

7.png

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Maggie,

 

Many thanks for your kind support. I am trying to incoporate your calculation on my data but receiving an error. Attached is the error could you please help me in where i am going wrong.

Error.PNG

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.