Forum Discussion

tyeriksen's avatar
tyeriksen
Frequent Visitor
5 years ago

Visualisation Top N filter needs value 27 to result 5.

Hi all, I have a visualisation of 200+ athletes, where I want to show top N = 5. 

 

First, the qualifying criteria:

AB>150

Seasons>2

 

All good so far:

 

 

 

When I filter Name by top 5, I get nothing. 

If I take top 27, I get my top 5, 

If I take top x, it grows accordingly, but I dont understand the logic.

I dont have any other page or report filters. 

The values all come from the same table, measures AVG and Seasons Played were made from the single table of data. 

Seasons Played = CALCULATE( DISTINCTCOUNT (Sheet1[Year] ))
AVG = CALCULATE(DIVIDE(SUM(Sheet1[H]), Sum(Sheet1[AB])), FILTER(Sheet1, Sheet1[Year]))

 

Any advice why this happens?

 

6 Replies

  • tyeriksen ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • tyeriksen's avatar
      tyeriksen
      Frequent Visitor

      Hi amitchandak , 

      Sure!

      I posted the link to download my file in a comment above. No sensitive info, its public data. 

      Thank you!

  • Hi tyeriksen 

    The filters in you 2nd image aren't the same as the 1st one.  There's no 'qualifying criteria' filters? Filter AVG by Top 5 rather than Name?

    Please supply your PBIX.

    regards

    Phil

    • tyeriksen's avatar
      tyeriksen
      Frequent Visitor

      Hi Anonymous , filters were the same, just in the scroll bar above. 


      Not a problem to share my file, its public info. The problem can be observed on
      Page 'Leaderboard Pitchers' in all ratio tables (e.g. K/IP, ERA, WH/IP, H/IP, BB/IP, OAVG, etc)

      Page 'Leaderboard Batters' in all ratio tables (e.g. Slugging Pct. , Batting Avg.)

       

      Also having issues with the same type of problem of top N filtering on the page 'Regular Season Batting Records', where Im unable to get a top 5 by Name, regardless of any filter allocation I try (year, league, name, statistic category, etc...)


      https://1drv.ms/u/s!Alr9NCLvEz89vlnZ92vqADFIgQmX?e=9xTsSL

      Thanks!

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi tyeriksen ,

     

    It may be because your AVG measure returns null values in some rows.

    If not, please provide sample data.

     

    Best regards,
    Lionel Chen

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

     

     

    • tyeriksen's avatar
      tyeriksen
      Frequent Visitor

      Hi v-lionel-msft , unfortunately thats not the case. 


      Not a problem to share my file, its public info. The problem can be observed on
      Page 'Leaderboard Pitchers' in all ratio tables (e.g. K/IP, ERA, WH/IP, H/IP, BB/IP, OAVG, etc)

      Page 'Leaderboard Batters' in all ratio tables (e.g. Slugging Pct. , Batting Avg.)

       

      Also having issues with the same type of problem of top N filtering on the page 'Regular Season Batting Records', where Im unable to get a top 5 by Name, regardless of any filter allocation I try (year, league, name, statistic category, etc...)


      https://1drv.ms/u/s!Alr9NCLvEz89vlnZ92vqADFIgQmX?e=9xTsSL

      Thanks!