2 Replies Latest reply: May 30, 2012 4:51 PM by Ross Luciano RSS

    Determing the associated values of a maximum

    ptegelaar1

      I have a column in a straight table in which I determine a maximum, using set analysis:

      max({$<Rate-={}>} Sales)

      In the second column I want to load the (minimum) value of 'Rate' associated with this maximum of Sales.

      How can I do this?

        • Determing the associated values of a maximum
          Karl Pover

          Does your table have a dimension?

          Try somthing like this

          =min({$<Sales={$(=max({$<Rate-={}>} Sales))}>} Rate)

          Regards.

            • Determing the associated values of a maximum
              Ross Luciano

              Hi, Karl, I'm trying to take your example here and apply it to my model.  I'm trying to get the highest/max sales day by location and then the sales date it occurred on.  The maximum Net Sales is working correctly, but I can't get it to pull in the SalesDate.  Here are the two expressions I'm using.

               

              //TO GET THE MAXIMUM OR HIGHEST SALES AMOUNT

              max({$<SalesDate-={}>} NetSales)

               

              //TO GET THE SALES DATE THE MAXIMUM SALES AMOUNT OCCURED ON

              max({$<NetSales={$(=max({$<SalesDate-={}>} NetSales))}>} SalesDate)

               

              I've tried several different set analysis formulas to get the date and I can't seem to figure it out.  Does it have something to do with the date field?  The date format being used in the load scipts/tables is MM/DD/YYYY

               

              Also, as you can see, I am using StoreName as my only dimension in this table.

              StraightTableResult.jpg