Forum Discussion

JacktheYeti's avatar
JacktheYeti
Helper I
6 years ago

Scatter Plot - Highlight data point via Slicer

Hello!

 

I am building a report that contains football player stastics. I've calculated the percentile each player is within for each of the stats (28 in all) and I'm trying to highlight where the player falls on the scatter chart, compared to the other players, using a slicer selection.

 

When I select the the player's name from the slicer, all of the other player's data is filtered out. Is there a way where the other player data remains and the selected player is highlighted in another color? 

Data after selecting player via slicerData without selecting playerDesired outcome

 

4 Replies

      • JacktheYeti's avatar
        JacktheYeti
        Helper I

        Hello v-lionel-msft 


        I've got it almost configured via the instructions from the link I provided earlier. the highlighting works!


        I'm gettin tripped up in two areas with some DAX:


        1. I'm using the following DAX to highlight a point on the scatter plot when a player name is selected. This works almost perfect, except it seems when the value of 'Search results (51)'[Ballberührungen pro 90 Min.] is zero or less then 1, that value & player is highlighted in addition to the player selected from the slicer when the only data point highlighted should be the player selected from the slicer.

        Sel_Ballberührungen pro 90 Min. = VAR BallPro90Min =
        SUM('Search results (51)'[Ballberührungen pro 90 Min.])
        RETURN SUMX(
        VALUES(IsSelectedFlag[Flag]),
        VAR SelVal =
        CALCULATE(SELECTEDVALUE(IsSelectedFlag[Flag]))
        Return
        SWITCH(
        SelVal,
        "Y",[ballberuhrungen pro 90 Slicer],
        "N",IF(BallPro90Min <> [ballberuhrungen pro 90 Slicer], BallPro90Min - [ballberuhrungen pro 90 Slicer])))

         


        2. The second issue I'm running into is calculating the Rank Percentile. I'm using the following DAX to calculate but it returns 100% for every data point:
        SelPercentile_Balberuhr = Divide(RANK.EQ([Sel_Ballberührungen pro 90 Min.],'Search results (51)'[Ballberührungen pro 90 Min.],ASC),COUNTROWS('Search results (51)'))

         


         I've used a similar formula before implementing the highlighting and the percentile was correct (pasting that DAX here for reference)

        percentile_Ballberührungen pro 90 Min. = Divide(RANK.EQ('Search results (51)'[Ballberührungen pro 90 Min.],'Search results (51)'[Ballberührungen pro 90 Min.],ASC),COUNTROWS('Search results (51)'))

         

        Thanks!


        Jack