Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need some held with the expression for the Total Sales column
account_manager_id | Acount_manager_name | Sales_budget | R12 -Responsible Accounts | YTD - Responsible Accounts | R1 - Responsible Accounts | Total Sales |
3 | Kim | 0 | 319 753 | 107 391 | 91 436 | |
50 | Stephan | 272 800 | 438 740 | 153 409 | 34 181 | |
57 | Jill | 150 000 | 53 633 | 45 405 | 0 | |
73 | Adam | 1 585 200 | 1 535 223 | 905 425 | 181 183 |
In the Total Sales column i want to have the calculation
sum (sales) where account_manager_id from Staff_Table = sales_person_id in Sales_Table
The total sales shall include all sales from each account manager, doesn't matter if he/she is responsible for that account or not.
If someone please can help me code the expression that is needed.
Hi Johan,
Can you post an example? Otherwise, perhaps this will work:
sum(if(account_manager_id = sales_person_id, sales))
Best,
Matt
This is almost correct, the only thing is that it only shows me the total sales where the account manager is the same.
The correct amount in this example should be 6,3 million
*bump*
Had your attachment been in English, would have been easier. Not sure if understood right. Try with set analysis p(), like:
=sum({<account_manager_id = p(sales_person_id)>} sales)
Hi Johan,
I'm still unclear on what you need. This makes sense to me and is solved with the sum/if expression:
sum (sales) where account_manager_id from Staff_Table = sales_person_id in Sales_Table.
However, I'm not sure how to interpret this:
The total sales shall include all sales from each account manager, doesn't matter if he/she is responsible for that account or not.
Could you elaborate? Perhaps include an excel showing how you calculate the 6.3 million or include a better explanation in the qvw.
Matt