3 Replies Latest reply: May 31, 2012 6:11 PM by Rob Wunderlich RSS

    How can use set analysis to find maximum sales and the date it occurred on in a straight table?

    Ross Luciano

      Hello, everyone!  I'm trying to get the highest/max net sales for a day by location and then the sales/business 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