admin管理员组文章数量:1287888
I am trying to find an easy way using two excel tables with a pivot table on the first table to apply a commission percentage, where a client could pay out commission to multiple Reps. New data would be copy/pasted into the first table columns A:C
Not sure best way to share tables here. Google shares require a google login.
Table:
Load# | ClientName | Profit | salesName | Sales% | commission |
---|---|---|---|---|---|
1 | c1 | 50 | =XLOOKUP([@ClientName],Table1[ClientName],Table1[salesName],0,0) | =XLOOKUP([@ClientName],Table1[ClientName],Table1[%],0,0) | =[@Profit]*[@[Sales%]]/100 |
2 | c2 | 60 | =XLOOKUP([@ClientName],Table1[ClientName],Table1[salesName],0,0) | =XLOOKUP([@ClientName],Table1[ClientName],Table1[%],0,0) | =[@Profit]*[@[Sales%]]/100 |
3 | c3 | 70 | =XLOOKUP([@ClientName],Table1[ClientName],Table1[salesName],0,0) | =XLOOKUP([@ClientName],Table1[ClientName],Table1[%],0,0) | =[@Profit]*[@[Sales%]]/100 |
I am trying to find an easy way using two excel tables with a pivot table on the first table to apply a commission percentage, where a client could pay out commission to multiple Reps. New data would be copy/pasted into the first table columns A:C
Not sure best way to share tables here. Google shares require a google login.
Table:
Load# | ClientName | Profit | salesName | Sales% | commission |
---|---|---|---|---|---|
1 | c1 | 50 | =XLOOKUP([@ClientName],Table1[ClientName],Table1[salesName],0,0) | =XLOOKUP([@ClientName],Table1[ClientName],Table1[%],0,0) | =[@Profit]*[@[Sales%]]/100 |
2 | c2 | 60 | =XLOOKUP([@ClientName],Table1[ClientName],Table1[salesName],0,0) | =XLOOKUP([@ClientName],Table1[ClientName],Table1[%],0,0) | =[@Profit]*[@[Sales%]]/100 |
3 | c3 | 70 | =XLOOKUP([@ClientName],Table1[ClientName],Table1[salesName],0,0) | =XLOOKUP([@ClientName],Table1[ClientName],Table1[%],0,0) | =[@Profit]*[@[Sales%]]/100 |
Table1:
salesName | ClientName | % |
---|---|---|
A | c1 | 10 |
B | c2 | 10 |
A | c3 | 7 |
B | c3 | 8 |
PivotTable, on above:
sales Name | Sum of commission |
---|---|
A | 9.9 |
B | 6 |
Results desired:
sales Name | Sum of commission |
---|---|
A | 9.9 |
B | 11.6 |
- in the end just created a new table based on a filter from first table, then created a third table with first and second table combined. – Edward Commented Feb 28 at 21:34
1 Answer
Reset to default 0You can use Power Pivot formulas:
Set up your inputs as tables:
- Main Table (let's call it
SalesData
):- Columns:
Load#
,ClientName
,Profit
- Columns:
- Lookup Table (let's call it
CommissionRates
):- Columns:
salesName
,ClientName
,%
- Columns:
Load Data into Power Pivot
Create Relationships, in Power Pivot, go to the Diagram View
, drag ClientName
from SalesData
to ClientName
in CommissionRates
to create a relationship.
Create Calculated Columns:
- In the
SalesData
table, create a new calculated column forsalesName
:=RELATED(CommissionRates[salesName])
- Create another calculated column for
Sales%
:=RELATED(CommissionRates[%])
- Create a calculated column for
commission
:=[Profit] * [Sales%] / 100
Insert a PivotTable using the newly created Data Model.
本文标签: excelUsing table with pivot to apply multiple rep postback based on clientStack Overflow
版权声明:本文标题:excel - Using table with pivot to apply multiple rep postback based on client - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741254384a2366387.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论