cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DarrenLau
Helper I
Helper I

Filtering a slicer (no relationship_

Hi,

 

Looking for some help to see if this can be done. Conceptually, I need to filter a dimension table based on a selection on another dimension table. These two tables are unable to be linked together as one of relationships will be made inactive.

 

In the PBIX example attached, I want the Location slicer selection to filter the Salesperson slicer and show only the 5 salespersons that are in that location.

 

Example PBIX file 

1 ACCEPTED SOLUTION

Thanks @Jihwan_Kim 

 

That would be an acceptable solution if I am trying to find salespeople with sales, the slicer should show users filtered by location.

 

I found the solution in another post and I have updated the PBIX - Filtering a slicer example 

 

DAX used

Location Filters Users =
IF (
    MAX ( 'Salespeople'[Location] )
        IN VALUES ( 'Sales Location'[SalesLocation] ),
    1,
    0
)

 

DarrenLau_0-1646634019150.png

 

View solution in original post

6 REPLIES 6
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

1. create a measure like below.

filter name by location: =
IF ( COUNTROWS ( VALUES ( Sales[Value] ) ) > 0, 1, 0 )
2. Put this measure into the Filterpane "Filter on this visual"
3. configure like the picture.
 
Picture1.png
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thanks @Jihwan_Kim 

 

That would be an acceptable solution if I am trying to find salespeople with sales, the slicer should show users filtered by location.

 

I found the solution in another post and I have updated the PBIX - Filtering a slicer example 

 

DAX used

Location Filters Users =
IF (
    MAX ( 'Salespeople'[Location] )
        IN VALUES ( 'Sales Location'[SalesLocation] ),
    1,
    0
)

 

DarrenLau_0-1646634019150.png

 

Awesome, thanks a lot!

parry2k
Super User
Super User

@DarrenLau check this video on my YouTube channel which talks about something similar. https://youtu.be/XXVRwvni4Ms

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Hi @parry2k ,

 

Thanks for the video link. I couldn't work out how to utilise the CROSSFILTER function in my example, but I found another post that had the correct solution.

@DarrenLau sounds good. Thanks for the update. Best!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Helpful resources

Announcements
Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Ignite 2022

What's Next at Microsoft Ignite 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Top Solution Authors