3 Replies Latest reply: Aug 6, 2012 10:29 AM by William Johnston RSS

    Help with set analysis

    William Johnston

      Hello All:

       

      I'm unable to get a set analysis to work as expected.

       

      I have a data table with a column for date, transaction type (sale, refund, void) and transaction store (100, 200, 300) as my dimensions, and then a measure such as "TRANSACTION_AMOUNT".

       

      What I want to do is build a chart that shows the sum of sales for each store, but only for sales that equal 2

       

      I'm using the following expression in my straight table (with store # and date as dimensions)

       

      sum( {$<TRANSACTION_AMOUNT={2}>} TRANSACTION_AMOUNT)

       

      This does give me a chart showing a store number, and then the sum of sales where transaction amount is $2.

       

      However, it is then ignoring any selections I make in list boxes (for instance, I have a list box that is for date, and no matter what selection I make in this list box (or any other list box), the table shows a list of all dates, and all stores, with their sum of $2 transactions.

       

      Set analysis is new to me, so do I have the syntax wrong?  I thought that using $ would give me the set of current selections, except add in a filter for transaction_amount.

       

      All objects are in the same state, as the chart works fine when the expression is sum(TRANSACTION_AMOUNT), except it shows all transactions.

       

      Thanks