Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Created a nested filter

I have a slicer where I select a product brand and I want the category it's in to show automatically but I haven't been able to figure it out.  Both pieces of data are in the same table.  

 

testMeasure = LOOKUPVALUE(LinkToBrand[Product Category (Dynamic) L2],LinkToBrand[Brand],SELECTEDVALUE(LinkToBrand[Brand]))

 

This formula works but I obviously can't use this in a slicer.  Any ideas?  

  • Hi Anonymous,

     

    No. Slicer in Power BI doesn't support to automatically select any item from the drop down list, even though there is only one item. Users have to choose values manually.

     

    Regards,

    Yuliana Gu

10 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    You should just have to get the MAX of the category. If you are using a slicer to filter to a particular product brand then there should be only 1 category so any aggregation that returns a text value (like MAX) should work.

     

    Then just display that measure in a card visualization.

    • Anonymous's avatar
      Anonymous
      Not applicable
      But the second slicer is required as it dissects a table. I can already get a card visualization using my formula. What I need is the user selects the brand and then the second slicer auto populates. This then still works on the tables. A card visualization cannot be used to slice a table as I understand. If it helps I can post image tomorrow from work. But this suggestion doesn't work I'm afraid.
  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Anonymous,

     

    Since both pieces of data are in the same table, there is no need to create any measure to return corresponding category values. Based on Visualization Interactions, when you select an item in first slicer, the second one will be automatically filtered, returning corresponding categories.

     

    Best regards,

    Yuliana Gu

    • Anonymous's avatar
      Anonymous
      Not applicable

       

      Maybe this image will help - if I select the top filter it will not automatically select the next filter - it still has to be clicked (it will stay on 'All' - when I click it on it, yes there is only one option but the point is having to click.  I just want it to auto select... 

      • Anonymous's avatar
        Anonymous
        Not applicable