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
  • CNENFRNL's avatar
    6 years ago

    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