lauriesamh
Technical User
Hi, I'm using CR 8.0. I have a sales table which has a primary account manager field. In some cases this field is blank and in this situation I need to pull the customer's primary account manager. To make it interesting I'm trying to group the managers into divisions based on a prior system that we converted from. How do I modify the @divisions formula to substitute the customer.PA_mgr instead of the division.PA_mgr when the sales.PA_mgr is null? See below
The tables I'm using are:
1. sales - has sales.PA_mgr
2. Customer - has customer.PA_mgr
3. division - division.PA_Mgr which relates to division.group
@divisions
if isnull({sales.PA_mgr}) then {customer.PA_mgr}
else
if {division.PA_Mgr} = "TCC" Then "TC" else
if {division.PA_Mgr} = "QC" Then "QC" else
if {division.PA_Mgr} = "BC" Then "BC" else
if {division.PA_Mgr} = "SC" and({sales.PA_mgr} in "##" to "#" then "FC"
The tables I'm using are:
1. sales - has sales.PA_mgr
2. Customer - has customer.PA_mgr
3. division - division.PA_Mgr which relates to division.group
@divisions
if isnull({sales.PA_mgr}) then {customer.PA_mgr}
else
if {division.PA_Mgr} = "TCC" Then "TC" else
if {division.PA_Mgr} = "QC" Then "QC" else
if {division.PA_Mgr} = "BC" Then "BC" else
if {division.PA_Mgr} = "SC" and({sales.PA_mgr} in "##" to "#" then "FC"