11 Replies Latest reply: Nov 17, 2011 10:14 AM by rizo98 RSS

Conditional aggr expression


Hello guys,


I am trying to do a conditional aggr function but failing.

I am trying to filter on salesman_id to find out what days he has worked.

I then wan to calculate the total sales by all salesman for that day.


e.g. in the attached spreadsheet, salesman Id 2005 has worked days 1,4,7,9 etc

I remove the filter from salesman ID and put the filter on day 1.

I then get the total of List Price for day one which is 90483.


I am struggling to put this in my expression, please help


  • Re: Conditional aggr expression
    John Witherspoon

    If I understood the problem, I think this?


    sum({<Day=P(),"Salesman ID"=>} Sales)

    • Conditional aggr expression

      Hi John,


      many thanks for the response.

      Always to the rescue.

      The expression seems correct, howeve I will not be able to test it untill tomorrow.

      I will get some feedback tomorrow.

      Thanks again

    • Conditional aggr expression

      Actually I can forsee a problem when displaying the data using salaman ID as a dimension.

      It will only sum the values for Salesman ID 2005. But I want it to add the totals for the days where Salesman ID 2005 has worked.


      So if Slaesman ID 2005 has worked as shown in days below and total is the total revenue for that day for sales made by all sales people.



      totals above add upto 779108


      I want it to show as below


      Slaesman ID Value
      2005 779108

      and list will go on for other salesman...



      I hope thats clear.