Key account managers who visit their clients (accounts) during a period of time);
The Key account managers can visit their accounts according to their panels as well as accounts that don't belong to their panels;
The call's table and account's table are in the same fact table (concatenate) identified by a field called SOURCE;
Everyday I store the panel's version for each manager and its identifier is the date.
CHALLENGE:
I need to calculate a panel coverage that shows the ratio between the accounts that a manager visited (only accounts that belong to its panel) and the manager's panel;
I have to consider always the last panel available according to the calendar selection criteria. Example:
If I select 2017-09, I'm going to consider the panel of 9/30/2017;
If I select 2017-07 and 2017-08, I'm going to consider the panel of 8/31/2017.
If I select Q1-2017, i'm going to consider the panel of 3/31/2017.
I have created a variable that already handles the item above (vSys.Account.MaxDate)
The formula below is kind of working, but it does not work when I use Period as dimension to check KPI evolution.
Formula rule:
Numerator:
Intersection between the managers calls and the last panel available according to user calendar selection;
vACCOUNT_StartDate: This variable sets the date I started validating the panel (august 24, 2017);
KEY_PANEL: Its a key that contains country+employee name+account id. I'm using it because the accounts can be into different panels;
TimeFlag: It's just a calendar field that says if the period is actual (1), previous (0).
Denominator:
Last panel available according to users calendar selection criteria.