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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.