Forum Discussion

nbs33's avatar
nbs33
Helper II
3 years ago

Measure slicer not filtering table correctly

Hi,

 

I am segementing customers into categories based on time periods, and by specific flags in the data set. I have confirmed my logic for the categories is correct and the counts of customers in each category is correct. 

 

I want to have a slicer so the user can select a category and it will filter the table to just those cusotmers. I have attached a sample data set here. There is only data for YoY.  When I select Lost in the slicer I would expect 617 values but I am only getting one customer in the table. Non of categories gives the right value in the table. I can't figure out where my logical error is. 

 

Any help is greatly appreicated. 

 

 

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    nbs33 I'm not entirely sure what you are going for here exactly, but your Buckets Slicer isn't connected to any tables. That means you have to form the relationship in the Measure. Your Retained and Organic measures work but there's something off about your Lost and Acquired measures. You basically need a measure along the lines of below but you'll also have to fix your Lost and Aquired measures to work more like your Retained and Organic measures. PBIX is attached below signature.

    Measure = 
        VAR __Group = SELECTEDVALUE('Buckets Slicer'[Groups])
    RETURN
        SWITCH(__Group,
            "All",COUNTROWS(DISTINCT(ALL('BoB'[CustomerKey]))),
            "Lost",[Lost],
            "Retained",[Retained],
            "Organic",[Organic],
            "Acquired",[Acquired],
            BLANK()
        )
    • nbs33's avatar
      nbs33
      Helper II

      Greg_Deckler thanks for the response. I was using a table filter to create that relationship to my disconnected slicer but that didn't work

       

       

      Not sure what could be wrong with my Lost and Acquired because the out is just a list of Customers. 

       

      I've been struggling with this issue for awhile. Any other apporaches your can think of? Since I have a time dimension slicer I can't use a calculated table.

       

      Thanks again!