I'm trying to use a slicer to exclude things selected. Please bear with me on this why I try explain my problem using simplified tables. Table 1 and Table 2 are related by Term ID. I would like to create a slicer using Item whereby if items are selected, the corresponding terms are excluded.
|Item one||this term is about item one and item two and mentions tag one||id1||1||tag one|
|Item one||this term is about item one only and mentions tag two||id2||1||tag two|
|Item one||another term about item one||id3||1|
|Item one||term about items one and three||id4||1|
|Item two||this term is about item one and item two and mentions tag one||id1||1||tag one|
|Item two||this term is about item two||id5||1|
|Item three||term about items one and three||id4||1|
|Item one||this term is about item one and item two||id6||2|
|Item one||this term is about item one only and mentions tag two||id7||2||tag two|
|Item two||this term is about item one and item two||id6||2|
E.g. if I selected Item one and country 1, then this is how I would expect my two table visuals to look. This is because all terms relating to item one have been excluded.
The way I did this was by creating another table:
Measure = VAR check = COUNT('Table3'[Term ID]) RETURN IF(ISFILTERED(Table3[Item]), IF(isblank(check),1,BLANK()), 1)If I add the measure in as a column into both table visuals, this only works for the first table. To get it to work for both, I have to add a visual level filter using the Term ID from Table 1 like this:
Thanks @MattAllington . That's a great article and I had already read it and tried that approach. Unfortunately it doesn't work for my use case because the terms are sometimes against multiple items - see below. Any ideas?
I am not 100% sure what you are doing, but my guess is you need to extract all the values you want to filter on from the ext field into another table, and then unpivot them so they are in a single column. This implies your text table needs an ID and the new table has the same ID and one row for every item (header/detail table structure). You can then turn on bi-directional filtering to make it all work. That is the approach I would try.
Thanks @MattAllington , although I haven't been able to get that to work. Sorry if my first message wasn't 100% clear. In my table, there is a list of terms which are basically tagged up accordingly. So a term can be tagged against multiple items for example. I want to use the items in a slicer to exclude the terms attached to the selected item. E.g. if item 1 is selected, this would exclude terms 3, 4 and 6, meaning any item 2 calculations would be done based on the remaining terms (1, 2 and 5). I've been struggling to find an efficient way of achieving this for weeks!
All DAX formulas are specific to the table, columns and relationships in your model. You don't mention how these things are structured so it is not possible to give you any more help. Your image seems to suggest that each row in a table can have more than 1 tag, but it is not clear how that works. Do you have many columns, 1 tag per column, or do you have 1 column with comma separators, or do you have a child tag table? The latter is what I suggested.