2 Replies Latest reply on Aug 25, 2014 6:14 PM by 2636873

    Filter expression  for max value calculation

    2636873

      Hi,

       

      I have created the following report

       

      Region      District       Dollar

      R1             D1             100

                       D2             200

                       D3             500

      R2             D4             200

                       D5            100

                       D6            150

      R3             D7             300

                       D8             500

                       D9             100

       

      I want to calculate the max dollar for each region amongst the districts using the FILTER expession

       

      Final output

      Region      District       Dollar

      R1             D3             500

      R2             D4             200

      R3             D8             500

       

      Please help.   

        • 1. Re: Filter expression  for max value calculation
          AjeetR

          Hi,

          Use FILTER(max("Dollar") USING (Region IN ('R1', 'R2', 'R3')))

           

          AjitR

          • 2. Re: Filter expression  for max value calculation
            2636873

            Hi Ajeet,

             

            Using FILTER(max("Dollar") USING (Region IN ('R1', 'R2', 'R3'))) is giving below output.

            R1             D1             500

                             D2             500

                             D3             500

            R2             D4             500

                             D5            500

                             D6            500

            R3             D7            500

                             D8            500

                             D9            500

             

            The output should be

             

            For R1 , D3 has highest dollars so it should come in the report. Similarly for R2, D4 and for R3,D8 has highest dollars.

             

            Region      District       Dollar

            R1             D3             500

            R2             D4             200

            R3             D8             500

             

            Saurav