cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Union to use as a slicer

I am looking for some ideas to use a joined column as a master filter or slicer to view my data, have a data set as below;

 

Relese CountryUnits SoldHold CountryUnits Recieved
Netherlands0Germany1
Germany0United Kingdom0
Netherlands1Switzerland0
Switzerland1India0

 

So i want to use a country filter and see the results like below ( for eg; if i select germany in the filter).

Country = Germany

Units Sold0Units Recieved1

 

Country = Switerland

Units Sold1Units Recieved0

 

The only id thats common is country name, but one country will be missing for units recieved, so will have to do full join.

 

Any ideas? Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Union to use as a slicer

@JCK2 , Create a country table

Country =
distinct(union(all(Table[Relese Country]),all(Table[Hold Country])))

 

Join both country column with that one active and one inactive or keep both inactive. And Use userelation to activate the join as per need.

Refer to this example for userelation  : https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: Union to use as a slicer

@JCK2 , Create a country table

Country =
distinct(union(all(Table[Relese Country]),all(Table[Hold Country])))

 

Join both country column with that one active and one inactive or keep both inactive. And Use userelation to activate the join as per need.

Refer to this example for userelation  : https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Helper II
Helper II

Re: Union to use as a slicer

Looks intresting! let me give it a try and keep you posted! Thanks Amit! 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors