Forum Discussion

ponchibonos's avatar
ponchibonos
Helper I
3 years ago
Solved

Two columns as segmentation

I have a table with two columns of responsibles of a Proyect.  Is possible to slice my data with the two columns independently? For example: When I selected "Ale" the slicer shows the data in...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi ponchibonos ,

     

    In addintion to  lbendlin's reply, you need to create an unrelated DIMRESPONABLE table and then create a measure to filter your visual.

    DIMRESPONSABLE = 
    DISTINCT (
        UNION ( VALUES ( 'Table'[RESONSABLE] ), VALUES ( 'Table'[RESONSABLE 2] ) )
    )

    Measure:

    Filter = 
    VAR _SELECTED =
        VALUES ( DIMRESPONSABLE[RESONSABLE] )
    RETURN
        IF (
            MAX ( 'Table'[RESONSABLE] )
                IN _SELECTED
                    || MAX ( 'Table'[RESONSABLE 2] ) IN _SELECTED,
            1,
            0
        )

    Add this measure into visual level filter and set it to show items when value = 1. Result is as below.

     

    Best Regards,
    Rico Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.