3 Replies Latest reply: May 17, 2017 9:06 AM by DANIEL CHOTZEN RSS

    count customers whos sales per country, matches the max sale per country

    DANIEL CHOTZEN

      Hi all,

      my data is more complex but for the sake of this question lets assume:

      simple table

      country, customer and sales

       

      now i have a pivot with country as dimension

      and max(sales) as expression

       

      that works and gives me the highest sales in each country

       

      now it happens so in each country there are more then 1 customer with the highest sale

      i want to count those

       

      any ideas on how?:)

       

      sample data:

       

      CountryCustomerSale
      israel a50
      israel b40
      israel c50
      israel d30
      israel e50
      israel f20
      englandg300
      englandh400
      englandi250
      englandj400
      englandk125

       


      and the result i need:

       

      CountryMax SaleNo of cust with max sale
      israel 503
      england4002


      thank you