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
Anonymous
Not applicable

One slicer from multiple columns

Hi,

 

I'm trying to create one slicer that contains items from different colums and will return the correct values.

 

Just an example, I have a table with region, countries, few cities and their population:

1.JPG

 

 

 

 

 

 

 

What I want to have is just one slicer instead of 3 different:

2.JPG

So in the end if I select Norway in slicer, population of Oslo + Bergen will be displayed, if I select Stockholm, then only Stokcholm's population will be displayed and if I select SCA, then total population will be displayed.

 

Is this doable?

 

Thank you in advance!

2 ACCEPTED SOLUTIONS
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

yes, it's doable. I propose the following solution:

 

1) Create a new table by going to Home -> Enter Data

You can then type in or paste the following:

Screenshot 2019-10-14 at 10.55.04 PM.png

 

2) Create a relationship between 'City' in the new table and 'City' the initial table. Make sure the cross filter direction is 'Both'.

 

Screenshot 2019-10-14 at 10.55.14 PM.png

3) Add a slicer based on the new column Location

 

Screenshot 2019-10-14 at 10.54.29 PM.png

That's it!

 

Let me know if it works for you. Regards,

 

LC

Interested in Power BI finance templates? Check out my blog at www.finance-bi.com

View solution in original post

v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

For your case, You may try these two ways:

1. Download the custom visual HierarchySlicer from Marketplace:

HierarchySlicer

and set it as below:

1.JPG

2. In edit queries, Select Region, Country, City column., Then Unpivot them

https://www.newtechdojo.com/unpivot-columns-in-power-bi/

Then use this new column as a slicer.

2.JPG

 

Regards,

Lin

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@v-lili6-msft @lc_finance 

Thank you! Both of your provided solutions work. 


Br,
Edgars

v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

For your case, You may try these two ways:

1. Download the custom visual HierarchySlicer from Marketplace:

HierarchySlicer

and set it as below:

1.JPG

2. In edit queries, Select Region, Country, City column., Then Unpivot them

https://www.newtechdojo.com/unpivot-columns-in-power-bi/

Then use this new column as a slicer.

2.JPG

 

Regards,

Lin

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

Hi @Anonymous ,

 

yes, it's doable. I propose the following solution:

 

1) Create a new table by going to Home -> Enter Data

You can then type in or paste the following:

Screenshot 2019-10-14 at 10.55.04 PM.png

 

2) Create a relationship between 'City' in the new table and 'City' the initial table. Make sure the cross filter direction is 'Both'.

 

Screenshot 2019-10-14 at 10.55.14 PM.png

3) Add a slicer based on the new column Location

 

Screenshot 2019-10-14 at 10.54.29 PM.png

That's it!

 

Let me know if it works for you. Regards,

 

LC

Interested in Power BI finance templates? Check out my blog at www.finance-bi.com

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.