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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
tamara_nsb
Helper I
Helper I

Apply slicer to multiple tables when adding a dim table causes ambiguity

I have a dim_Location table that and several other tables that are all connected,   many of the table contain the field location but they are not all the same value.    They want to be able to have one "Location" slicer on a page that is applied to all tables but because relationships between the other tables I can't make an active relationship to my dim table or it causes ambiguity.   How can I work around this?

 

Example.   Customer has a Many-1 relationship with sales.   Which I need to use in several visualizations and measures,  but they also want to be able to filter by location.    Show customers and sales that meet the location slicer.  I know this might not make sense as to "why" I would want to do this but I am trying to make a simple example.

Dim_Location

LocationIDName
1AL
FL
3HI

 

sales

IDCustomerLocationValue
1maryFL5.00
2JohnHI2.50
3samHI7.00

 

customer

NameLocation
samHI
JohnFL
maryAL
1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @tamara_nsb  - You already have:

Dim_Location[LocationID], Dim_Location[Name]

Sales[Location], Customer[Location]

But cannot connect Dim_Location[Name] actively to both without ambiguity.

This captures the selected location from the slicer

SelectedLocation =
SELECTEDVALUE(Dim_Location[Name])

 

Create Filtered Measures for Your Visuals

 

Filtered Sales =
CALCULATE(
SUM(Sales[Value]),
Sales[Location] = [SelectedLocation]
)

 

And for Customer count

Filtered Customers =
CALCULATE(
DISTINCTCOUNT(Customer[Name]),
Customer[Location] = [SelectedLocation]
)

 

This works without needing active relationships - the filtering is done within the measure logic based on slicer selection.Only use [Filtered Sales], [Filtered Customers], etc., in your visualizations instead of raw fields. I hope the above steps helps.

 





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

Proud to be a Super User!





View solution in original post

3 REPLIES 3
v-bmanikante
Community Support
Community Support

Hi @tamara_nsb ,

 

Thank you for reaching out to Microsoft Fabric Community forum.

@rajendraongole1 Thank you for your quick response.

 

You can use the measure suggested by the super user @rajendraongole1 , which works well. Alternatively, you can keep the relationship between the Customer and Location tables inactive and use the USERELATIONSHIP function to control the filter path explicitly.

 

For example, you can create a measure like this:

 

CountOfCustomers =

CALCULATE(COUNT(Customer[Name]),USERELATIONSHIP(Customer[Location],Dim_Location[Name]))

)

 

This allows you to avoid ambiguity while still leveraging both relationships as needed.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

Regards,

B Manikanteswara Reddy

rajendraongole1
Super User
Super User

Hi @tamara_nsb  - You already have:

Dim_Location[LocationID], Dim_Location[Name]

Sales[Location], Customer[Location]

But cannot connect Dim_Location[Name] actively to both without ambiguity.

This captures the selected location from the slicer

SelectedLocation =
SELECTEDVALUE(Dim_Location[Name])

 

Create Filtered Measures for Your Visuals

 

Filtered Sales =
CALCULATE(
SUM(Sales[Value]),
Sales[Location] = [SelectedLocation]
)

 

And for Customer count

Filtered Customers =
CALCULATE(
DISTINCTCOUNT(Customer[Name]),
Customer[Location] = [SelectedLocation]
)

 

This works without needing active relationships - the filtering is done within the measure logic based on slicer selection.Only use [Filtered Sales], [Filtered Customers], etc., in your visualizations instead of raw fields. I hope the above steps helps.

 





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

Proud to be a Super User!





Thanks for the help,  this is exactly what I needed.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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