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
PB2022
New Member

Data relationship issue

Slicer(s) on one page do not filter correctly. When an option in the first slicer is selected, it filters out data in another slicer. It appears; that there is only one option under the slicer when there should be multiple options. When i change the relationship between two table from cross filter direction equal both to cross filter equal single. Then, pick two other tables changing the cross filter direction equal single to cross filter direction to both the slicers on the page work. However, visualizations on other pages do not work.  

Any suggestions? 

1 ACCEPTED SOLUTION
JoaoMarcelino
Responsive Resident
Responsive Resident

Hi @PB2022 !

Welcome to this amazing community 🙂

From my understanding, it seems you've activated the "both" direction in relationships to allow a measure to work, but that will indeed show the behavior you described: a slicer 1 filters slicer 2 and vice-versa.

In this example, a "both" direction relationship means that not only the manufacturer filters product but also the product will filter the manufacturer:

JoaoMarcelino_0-1652452872428.png

Manufacturer filters product:

JoaoMarcelino_1-1652452921463.png

But Product also filters manufacturers:

JoaoMarcelino_2-1652453055872.png

 

If the visuals are breaking, this might mean that the way your DAX formula is written, needs "Both".

What you can do, for instance, is: simulate the "both" direction between your tables in your DAX measure.

Something like:

Measure with cross-filter  = 
CALCULATE (
        [measure],
        CROSSFILTER ( table 1 [table 1 ID], table 2 [table 2 ID], Both)

)

For further detail on the use of cross-filter I recommend you this article: CROSSFILTER function - DAX | Microsoft Docs

 

Hope I was of assistance!
Cheers
Joao Marcelino

Ps- Did I answer your question? Mark my post as a solution! Kudos are also appreciated 🙂

View solution in original post

1 REPLY 1
JoaoMarcelino
Responsive Resident
Responsive Resident

Hi @PB2022 !

Welcome to this amazing community 🙂

From my understanding, it seems you've activated the "both" direction in relationships to allow a measure to work, but that will indeed show the behavior you described: a slicer 1 filters slicer 2 and vice-versa.

In this example, a "both" direction relationship means that not only the manufacturer filters product but also the product will filter the manufacturer:

JoaoMarcelino_0-1652452872428.png

Manufacturer filters product:

JoaoMarcelino_1-1652452921463.png

But Product also filters manufacturers:

JoaoMarcelino_2-1652453055872.png

 

If the visuals are breaking, this might mean that the way your DAX formula is written, needs "Both".

What you can do, for instance, is: simulate the "both" direction between your tables in your DAX measure.

Something like:

Measure with cross-filter  = 
CALCULATE (
        [measure],
        CROSSFILTER ( table 1 [table 1 ID], table 2 [table 2 ID], Both)

)

For further detail on the use of cross-filter I recommend you this article: CROSSFILTER function - DAX | Microsoft Docs

 

Hope I was of assistance!
Cheers
Joao Marcelino

Ps- Did I answer your question? Mark my post as a solution! Kudos are also appreciated 🙂

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