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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
CasaMoreira
New Member

How to surpass single filter direction?

Hello everyone
I have the below datamodel:

CasaMoreira_0-1712830560818.png

I have a table visualization with the content of table 4, and a slicer with the content of table

Selecting a value of table1, I want to see the related values of table 4

This is not working because of the relationship direction from table 2 and table 3.

Using a bi-directional filter is not an option (ambiguity).

How can I accomplish this?


9 REPLIES 9
tharunkumarRTK
Super User
Super User

@CasaMoreira 

You can use CROSSFILTER dax function and tweak the directionality for that one particular calculation to 'BOTH' instead of SINGLE.

https://dax.guide/crossfilter/


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun



Thank you.

can you give me an example? Where should I create the measure with the CROSSFILTER?

In power bi measures are bind to any table, you can create measures in any table. I hope this answers your question.


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

The problem is that creating this measure will not return a single value, but a list of connected values... So creating this measure in Table 2 will not work. Doesn't it make sense?

CasaMoreira_0-1712832848887.png

I corrected the measure and added aggregation, please copy it again and test it.


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

Creating the measure below in table 2 doesn't work because of the "MAX" -> only returns one item... 

Should we create it in other table?

@CasaMoreira 

 

Yes this measure will only retrieve one scalar value. If you want to retrieve all values and consider modifying your model and follow star schema parctices then you would not require crossfilter function.

@CasaMoreira 

 

Assuming your related table1_2 and table 2 with value2id columns

 

CALCULATE (
            MAX(table4[value2id]),
            CROSSFILTER ( table1_2[value2id], table2[value2id], BOTH )
        )

 


Your model is deviating from the principles of star schema, and it is not a good practice 🙂


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

I undestand....

But I have filters (table 2 and 3) that are set in table 1

And these filters are available in table 4... So I couldn't find any other way to do this...

For the expression shared:

CALCULATE (
            table4[value2id],
            CROSSFILTER ( table1_2[value2id], table2[value2id], BOTH )
        )

I tried to add this as a measure in Table 2, but it's not allowing the first paramenter of the CALCULATE function "table4[value2id]"...

Can you please help here? 😞

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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