cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dennes
Frequent Visitor

To filter or not to filter, that's the question

Hi,

 

I have two tables, A and B, parent and child.

 

Table A is on a slicer, table B is on a Matrix.  Table B has a measure using table A on the expression, It's this:

 

NumFilter = IF(CONTAINS('Selector Table';[Number];'Super5'[Number]);1;0)
 
('Selector Table'=A; 'Super5' =B)
 
The problem is: When I select something on the slicer, table B is visually filtered according to the slicer and the measure is calculated according to the filtered slicer (filtered table A).
 
The measure is correct, that's what I want, but I don't want the direct visual filter, I have other plans for filtering.

Already tried two options: disable interactions on the visual and breaking the relationship. Both options apply for both situations, totally breaking the result.
 
I also tried VALUES inside the contains, no result. 

So: How to make the measure use the table A filtered according to the slicer without visually filtering table B?
 
Thank you!
2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

Very difficult to say without sample data to play with, but perhaps disconnect your slicer table from your other table and use VALUES in a VAR.

@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

Dennes
Frequent Visitor

Hi,

 

I found the problem.

 

On the first message, I said I had a measure, but it was not true: it was created as a calculated column, not measure. My mistake.

 

As soon as I converted it to a measure, it became able to get the filtered data from another table using the previous information, about creating a var inside the expression.

 

Regards,

 

Dennes

 

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

Very difficult to say without sample data to play with, but perhaps disconnect your slicer table from your other table and use VALUES in a VAR.

@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi, Greg,

 

Thank you for the suggestion. I tried, didn't work, no difference in the result.

 

Regards,

 

Dennes

 

Dennes
Frequent Visitor

Hi,

 

I found the problem.

 

On the first message, I said I had a measure, but it was not true: it was created as a calculated column, not measure. My mistake.

 

As soon as I converted it to a measure, it became able to get the filtered data from another table using the previous information, about creating a var inside the expression.

 

Regards,

 

Dennes

 

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors