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
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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

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
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.