Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Weekly Top 5

Hello,

 

Fairly new to BI and I have built a YTD, weekly, column chart that displays our customer service teams top case issues, per category. When I filter the "Issues" to only display the top 5 (by count), it's giving me the top 5 issues over the year. I need to see the top 5 issues per week and I'm not sure how to make this work. I've attempted a measure, in which I'm attempting to calculate the issues per week, and it works if I select a specific week(with slicer date selection), but not on the overall YTD chart. I have included a snippet of the column chat, but I can't provide much more data. Thanks in advance.

 

Breakdown:

YTD column chart

Y axis = count

X axis = week

Data = "Issue" per "Category"

 

Current: Providing top 5 "Issues" for the year. 

Need: Top 5 "Issues" per week

 

7 Replies

  • Hi Anonymous ,

     

     

    the solution would be to filter the table for calculating the top 5 issues per week.

    You can filter a table either using FILTER or using CALCULATE.

     

    Are you able to share a Power BI sample file? (of course not with real data, but sample data)

    I'd need to take a look at your PBI file to better understand your model and provide you with more help.

     

    Regards

     

    LC 

    Interested in Power BI and DAX tutorials? Check out my blog at www.finance-bi.com

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi lc_finance ,

       

      Thank you for the response. I have attached a snippet of a table I built. I hope this give you an idea of how our data model is being built. I am currently using a calculate measure to try and pull my top 5 per week, however, the issue I have currently is that it will only show the top 5 for the year. The only way I can see the top 5 per week is by using a Slicer and pulling it week by week, but I need to see it week over week as shown in my previous post. 

       

      Sample Data: I'm pulling thousands of cases and trying to pull top 5 issues per category, per week.

       

      Individual week pulled for a category.

      • lc_finance's avatar
        lc_finance
        Solution Sage

        Thank you Anonymous  for your reply.

         

        To help you further, could you share a sample Power BI file?

        That would make it a lot easier to understand the issue and help you.

         

        Regards

         

        LC

  • Jpalji's avatar
    Jpalji
    Frequent Visitor

    Hello Anonymous ,

     

    Try creating a table with DAX function TOPN  .

    I have a table called the city as follows:

     

     

     

     

     

     

    Created a new table using TopN function as following :

     

     

     

     

    Hope this helps.

    VK

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Jpalji ,

       

      Thanks for the response. I've looked into TOPN, but when I've attempted this function I get the top 5 issues for the year, and not for each week. I've done quite a bit of research and can't figure out how to make this function work for my week over week visual.