Forum Discussion

py1029's avatar
py1029
Frequent Visitor
4 years ago
Solved

Can I remove the overlapping values in different listing after applying filter?

Hi,   I would like to ask if there is a possibility to remove the overlapping project appear in my table after I apply different "Plant" and "Distance from Plant (KM)" filter?    For example, I h...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi py1029 

    Here I suggest you to create a measure to filter your table visual by Slicer from unrelated table, Distance and Plant Name.

    Firstly, we need to create two unrelated table Distance and Plant Name.

    Distance from Plant(KM) = GENERATESERIES(0, 10, 1)
    Plant Name = VALUES('Table'[Plant Name])

    Measure:

    Filter =
    VAR _CURRENTDistance =
        SUM ( 'Table'[Distance from Plant(KM)] )
    VAR _CURRENTPlantName =
        MAX ( 'Table'[Plant Name] )
    VAR _SelectPlantName =
        SELECTEDVALUE ( 'Plant Name'[Plant Name] )
    VAR _MinDistance =
        MIN ( 'Distance from Plant(KM)'[Parameter] )
    VAR _MaxDistance =
        MAX ( 'Distance from Plant(KM)'[Parameter] )
    VAR _MinDistanceEachProject =
        MINX (
            FILTER (
                ALL ( 'Table' ),
                'Table'[Project Name] = MAX ( 'Table'[Project Name] )
            ),
            'Table'[Distance from Plant(KM)]
        )
    RETURN
        IF (
            ISFILTERED ( 'Plant Name'[Plant Name] ),
            IF (
                _CURRENTPlantName = _SelectPlantName
                    && _CURRENTDistance > _MinDistance
                    && _CURRENTDistance < _MaxDistance
                    && _CURRENTDistance = _MinDistanceEachProject,
                1,
                0
            ),
            1
        )

    Create a table visual, add this measure into filter field in this visual and set it to show items if value =1.

    Select Sentul:

    Select KLC:

    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.

     

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi py1029 

    I think you want to filter you visual by this unrelated Distance from Plant(KM). You can refer to [Filter] measure to create a new measure to to filter other visuals by Distance, in range return 1 and out range return 0. Then add this new measure into filter field in other visuals and set this measure to show items when value =1.

    Measure:

    Basic Filter = 
    VAR _SelectPlant = VALUES('Plant Name'[Plant Name])
    VAR _MINDistance = MIN('Distance from Plant(KM)'[Parameter])
    VAR _MAXDistance = MAX('Distance from Plant(KM)'[Parameter])
    RETURN
    IF(MAX('Table'[Plant Name]) IN _SelectPlant && SUM('Table'[Distance from Plant(KM)])>=_MINDistance&&SUM('Table'[Distance from Plant(KM)])<=_MAXDistance,1,0)

    Result:

    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.