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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JCK2
Helper III
Helper III

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
amitchandak
Super User
Super User

@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...

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@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...

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors