4 Replies Latest reply: Jan 12, 2015 5:31 AM by Aaron Morgan RSS

    Expression for sharing selections between alternate states not working?

    Aaron Morgan

      Hi all,


      I've got a simple dashboard that has an alternate state (called Basket1). I've got two lists of products - the same list, but one in the default state and one in the alternate state.


      A user selects a product from both and three tables then tell them who has bought Product A and not B, B and not A and who's bought both.


      They all work okay, but in the "both" table I'm trying to show the sales over the selected dates for both products, but only for those who bought both. The table is in the alternate state, and if I *just* show the sales for Product B (the alternate state product) it works fine, as soon as I try and show the sales for A it brings all the customers who have bought A through regardless of if they've purchased B.


      The expression that works to show B is:

      =Sum({<Year=$::Year, PeriodNumber=$::PeriodNumber, Customer=P({$}Customer)>}Sales)



      When I try and show A, this doesn't work:

      =Sum({<Year=$::Year, PeriodNumber=$::PeriodNumber, Customer=P({$}Customer), Product=$::Product>}Sales)


      Any thoughts as to what I'm doing wrong? I've used $:: as the user makes selections in Year, PeriodNumber and Product and P as they don't select any Customers, but want any possible ones with the selections that have been made, however I've tried using $:: for customer and it gives the same result.