Forum Discussion

dwelsh's avatar
dwelsh
Icon for Advocate I rankAdvocate I
6 years ago
Solved

Filter Selection for Visuals Excluded on another Table

I am making an item sale Power BI with many different visuals.   For most of the visuals, I want to see sales on an item selected in my Item filter.  For example, if Apples is selected in the Item filter, one of my tables would show something like this:

 

ProductQty SoldAmount SoldMarginAvgSpent
Apples20$4025%$15

 

I also want to have a table showing items and qauntities sold with Apples.   My issue is, I don't know how to keep Apples from appearing like the below on my Sold With table: 

 

Sold WithQty Sold
Apples20
Bananas17
Oranges17
Grapes15
Avacodos14
Strawberries13

 

Is there a way to automatically exlude whatever is choosen in the Item Filter from a table? 

  • dwelsh's avatar
    dwelsh
    6 years ago

    Thanks v-xuding-msft for the reply.  This doesn't quite do what I want it to as I need it to interact.   The table needs to show everything that sold in the same transaction as Apples.   I just need Apples to be excluded from the table.   

     

    I found a way to get this to work by using a measure with the SELECTEDVALUE function.

     

    ItemExclude = IF(MAX('Items2'[ItemName]) = SELECTEDVALUE('Items'[ItemName]), "TRUE", "FALSE")

     

    Then I added the ItemExclude measure as a filter set to False on the Table.   The Item then is excluded from the 'Sold With' table.

2 Replies

    • dwelsh's avatar
      dwelsh
      Icon for Advocate I rankAdvocate I

      Thanks v-xuding-msft for the reply.  This doesn't quite do what I want it to as I need it to interact.   The table needs to show everything that sold in the same transaction as Apples.   I just need Apples to be excluded from the table.   

       

      I found a way to get this to work by using a measure with the SELECTEDVALUE function.

       

      ItemExclude = IF(MAX('Items2'[ItemName]) = SELECTEDVALUE('Items'[ItemName]), "TRUE", "FALSE")

       

      Then I added the ItemExclude measure as a filter set to False on the Table.   The Item then is excluded from the 'Sold With' table.