Forum Discussion

somyasahu's avatar
somyasahu
Regular Visitor
9 years ago
Solved

Top 5 Countries for various categories

Hi,

 

I am new to PBI and I have a data for 6 different product categories of 40 countries each with different revenue numbers. [ One column each for product category, country name, revenue number and year) I want top 5 countries for each category basis the revenue figures. Using a calculated column, PBI does not consider the different product categories and just results in the total rank from the overall data. Using the calculated measure, I get an error that one single value cannot be found for this field. Please help. Thanks

  • Anonymous's avatar
    Anonymous
    9 years ago

    somyasahu

     

    No problem, I want to help you out. Try this out. This should work for every product category, just slice on it:

     

10 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi somyasahu

     

    What measure did you try to use? Can you make an example of how your data is stored?

    • somyasahu's avatar
      somyasahu
      Regular Visitor

      Hi,

       

      For measure, I used RANKX using SUM, ALLSELECTED and tried with a couple of more functions that i found online.

       

      My data is stored as below

       

      Product CategoryCountryYearRevenue in mnQuarter
      Category 1Bosnia20163Q1
      Cat 2Australia20170Q3
      Cat 2China20161Q2
      Cat 3Colombia20160Q1
      • Anonymous's avatar
        Anonymous
        Not applicable

        somyasahu

         

        And you want to base you rank on the revenue?