Forum Discussion

gussie's avatar
gussie
Frequent Visitor
5 years ago

Exclude and Include Slicer

Hi Everyone,

I am at a roadblock in a current assignment... I have a product matrix that includes:

 Product AProduct BProduct CProduct D
Customer 11 32
Customer 221 1

 

INCLUDE SLICER: I would like a filter that if I select it shows me if customer has Product A and Product B then it will show:

 Product AProduct BProduct CProduct D
Customer 221 1

 

EXCLUDE SLICER: I would also like a filter that shows me if a customer does not have a certain product. For example a slicer if I select Product B it will show:

 Product AProduct BProduct CProduct D
Customer 11 32



I have the measure for each product calculating what products each customer has. If a customer doesn't have a certain product it is blank. Am I doing this correctly? How would I go about a exclude and include slicer 🙂

 

active_product_a = 

VAR A = CALCULATE( SUM( fact[qty] ),

ALL(fact),

VALUES(dim_customer[customer_name]),

fact[product_type] = "A"

)

RETURN

IF( A = 0, BLANK(), A)

3 Replies

    • gussie's avatar
      gussie
      Frequent Visitor

      I don't want to use an independent table, I want to use the same table.

       

      Thanks 🙂

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi gussie ,

         

        You will need an independent table. If you use the same table, the slicer will also filter the visual.

         

        Best Regards,

        Jay