Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Single Slicer?

I have this data:



So as you can see, a company can have a Cobra manager, a Flex manager, or both. For the most part it tends to be the same person, but there are some exceptions. Is there any way to set this up so rather than picking a persons name as a COBRA AM or a Flex AM, there's just one slicer that returns any record with their name associated regardless of what type of manager they are for a particular record? So for instance rather than selecting Kayla Lockhart from the COBRA AM slicer and only seeing records where she is a COBRA AM, I can see records where she's either a COBRA AM or a Flex AM. I do not wish to combine COBRA and Flex into one column because I still need to see it split out. Thanks! 

  • You could use an unrelated person table and a measure like this:

     

    Measure = 
    VAR myPerson = IF(HASONEVALUE(People[People]),SELECTEDVALUE(People[People]),BLANK())
    RETURN IF(myPerson IN ALLSELECTED(COBRA[COBRA AM]) || myPerson IN ALLSELECTED(COBRA[Flex AM]),1,0)

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    You could use an unrelated person table and a measure like this:

     

    Measure = 
    VAR myPerson = IF(HASONEVALUE(People[People]),SELECTEDVALUE(People[People]),BLANK())
    RETURN IF(myPerson IN ALLSELECTED(COBRA[COBRA AM]) || myPerson IN ALLSELECTED(COBRA[Flex AM]),1,0)
    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler I meant to ask, what is meant by an unrelated person table? Is that just joining both columns into a single table of it's own then creating the measure from that table and relating it back to my original table?

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        I just meant don't create a relationship between your Person table and your other table.