cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Ale
Resolver II
Resolver II

1 single common Slicer to filter 2 different "Country columns" in the dataset (in different visuals)

My problem is the following:

 

I have a dataset where I have 2 country Columns: CountryOfOrigin and CountryOfDestination.

 

I built 2 visuals (tables) to display all product being shipped TO and FROM the selected country.

 

The first visual worked fine, when I simply used the CountryOfDestination as Slicer, and in the table I used the CountryOfOrigin as dimension.

 

However, the second visual does not work, as the slicer is slicing the CountryOfDdestination, and here I would need it to slice the CountryOfOrigin.

 

I made a quick Excel representation of what my data looks like, and what is the output I want: https://i.postimg.cc/hPQhQTf4/Country-Issue.png

 

CountryIssue.PNG

 

 

 

 

 

 

 

 

Bottomline is: how do I make a common slicer that would filter 2 different columns?

1 ACCEPTED SOLUTION
Ale
Resolver II
Resolver II

Hi Robert,

 

thanks for your reply. Interesting, I just learned something I didn't know! However, it was not exactly what I was looking for. I think I did not make myself clear, but I ended up finding a solution myself.

 

What I did was:

Created a table with the list of countries and used it as a Slicer.

 

Then I created 2 inactive relationships, one to CountryOfOrigin and one to CountryOfDestination.

 

In the measure, I used the USERELATIONSHIP() to activate the relationship between them on the fly. With that I simply created my 2 visuals using the respective measures.

 

Thanks again for your reply.

View solution in original post

3 REPLIES 3
Ale
Resolver II
Resolver II

Hi Robert,

 

thanks for your reply. Interesting, I just learned something I didn't know! However, it was not exactly what I was looking for. I think I did not make myself clear, but I ended up finding a solution myself.

 

What I did was:

Created a table with the list of countries and used it as a Slicer.

 

Then I created 2 inactive relationships, one to CountryOfOrigin and one to CountryOfDestination.

 

In the measure, I used the USERELATIONSHIP() to activate the relationship between them on the fly. With that I simply created my 2 visuals using the respective measures.

 

Thanks again for your reply.

Hi, @Ale 

Glad to hear that you have solved the problem by yourself, would you like to mark your own reply as a solution so that others can learn from it too?

Thanks in advance!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-robertq-msft
Community Support
Community Support

Hi, @Ale 

According to your description, I guess you want to create a Slicer that slices the column [CountryOfDestination] and [CountryOfOrigin] at the same time. If you want to achieve this, you can just try to place these two columns in one slicer, then you can slice them at the same time, like this:

v-robertq-msft_0-1607583613948.png

 

More info about Slicer in Power BI

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors