Forum Discussion

GAURAV7781's avatar
GAURAV7781
Icon for Helper III rankHelper III
6 years ago
Solved

How to create slicer with categories

I have a categories

Categories

A

B

C

D

E

 

Desired category output is

A,B = Car

A,B,E=Bike

A,B,C,D,E=Plane

  • GAURAV7781 I have a coarse solution if I understand your issue correctly.

    Measure =
    VAR __selected =
        CONCATENATEX ( ALLSELECTED ( Categories[Category] ), Categories[Category] )
    RETURN
        SWITCH (
            __selected,
            "AB", "Car",
            "ABE", "Bike",
            "ABCDE", "Plane",
            "Other option"
        )

  • RobbeVL's avatar
    RobbeVL
    6 years ago

    Hi ,

    This is the least to say a creative solution to the problem! 🙂 
    I'm pretty sure if you try "SW" instead of "WS" it will work.

    If it doesnt, i'll help you with a different approach.

     

    Regards,

    Robbe

5 Replies

  • CNENFRNL's avatar
    CNENFRNL
    Icon for Community Champion rankCommunity Champion

    GAURAV7781 I have a coarse solution if I understand your issue correctly.

    Measure =
    VAR __selected =
        CONCATENATEX ( ALLSELECTED ( Categories[Category] ), Categories[Category] )
    RETURN
        SWITCH (
            __selected,
            "AB", "Car",
            "ABE", "Bike",
            "ABCDE", "Plane",
            "Other option"
        )

    • GAURAV7781's avatar
      GAURAV7781
      Icon for Helper III rankHelper III

      CNENFRNL hi is there a way to make desired column as slicer . My user want to select car and bike as filter 

      • GAURAV7781's avatar
        GAURAV7781
        Icon for Helper III rankHelper III

        I tried W, S & rest are working 

        only when i am select WS together not working CNENFRNL WS Not woking