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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
PBI_AMS
Helper I
Helper I

Slicing a visual while excluding the selected value from the visual

I am analyzing subscriber data.  I have 100k plus subscribers who have opted into up to 10 topics. What I want to be able to see is: If you are a subscriber to topic C, what OTHER topics are you also subscribed to?  To do this, I have created a contact filter table and contact output table with many-to-many connection on contact GUID.  If I select topic C in a slicer from the filter table, I can see a bar chart of topics A-J using data from the output table.  This visual shows topic C as the highest number of subscribers but also shows what other topics those subscribers are interested in.  This provides some insights from multi-select as well. X # of subscribers to C AND/OR F will also be interested in J.  However, the behavior I want is to EXCLUDE any items I've selected in my Slicer from the output visual. My searches have yielded several (nifty!) tutorials for how to create a slicer to exclude selected items from a visual but not while simultaneously slicing that visual by those selections.  Any help?  

1 ACCEPTED SOLUTION

Hi @PBI_AMS ,

Thanks for reaching out to the Microsoft fabric community forum.

 

Try this DAX measure :

 

ExcludedTopics =
VAR SelectedTopics =
    VALUES(ContactFilterTable[SelectedTopic])

VAR HasSelection =
    COUNTROWS(SelectedTopics) > 0

VAR SelectedContacts =
    CALCULATETABLE(
        VALUES(ContactOutputTable[ContactGUID]),
        ContactOutputTable[Topic] IN SelectedTopics
    )
RETURN
IF(
    HasSelection,
    CALCULATE(
        COUNTROWS(ContactOutputTable),
        FILTER(
            ContactOutputTable,
            ContactOutputTable[ContactGUID] IN SelectedContacts &&
            NOT(ContactOutputTable[Topic] IN SelectedTopics)
        )
    ),
    0
)


Find the below Attached .pbix file for your reference.

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

Best Regards,
Sreeteja.
Community Support Team 





View solution in original post

5 REPLIES 5
PBI_AMS
Helper I
Helper I

Okay, maybe I just had to type that out to get to my answer.  I created thie following measure to use in the visuals, and it works like a charm! 

ExcludedTopics = CALCULATE( COUNTROWS(ContactOutputTable), FILTER( ContactOutputTable, NOT(ContactOutputTable[Topic] IN VALUES(ContactFilterTable[SelectedTopic])) ) )

Hi @PBI_AMS ,

Thanks for reaching out to the Microsoft fabric community forum.

 

Try this DAX measure :

 

ExcludedTopics =
VAR SelectedTopics =
    VALUES(ContactFilterTable[SelectedTopic])

VAR HasSelection =
    COUNTROWS(SelectedTopics) > 0

VAR SelectedContacts =
    CALCULATETABLE(
        VALUES(ContactOutputTable[ContactGUID]),
        ContactOutputTable[Topic] IN SelectedTopics
    )
RETURN
IF(
    HasSelection,
    CALCULATE(
        COUNTROWS(ContactOutputTable),
        FILTER(
            ContactOutputTable,
            ContactOutputTable[ContactGUID] IN SelectedContacts &&
            NOT(ContactOutputTable[Topic] IN SelectedTopics)
        )
    ),
    0
)


Find the below Attached .pbix file for your reference.

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

Best Regards,
Sreeteja.
Community Support Team 





Hi @PBI_AMS  ,
May I ask if you have resolved this issue? If so, please mark the helpful replyThis will be helpful for other community members who have similar problems to solve it faster.

Hi @PBI_AMS ,

Just wanted to check if you had the opportunity to review the suggestion provided?

 

Hi @PBI_AMS ,

I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors