References
Learn about subject references in Visier.
Overview
The analytic model can consist of multiple analytic objects. In some cases, it may be useful to connect the information stored in one subject with another subject or event. Subject references are special properties that establish the relationship between subjects and events in the analytic model. This allows members of different subjects to link to one another through a forward or reverse reference, providing an additional layer of detail for the relationship between objects. For example, you may want to look at Applicant data when analyzing employees to understand where your top talent was sourced. In this example, the Employee object references the Applicant object to connect an Employee's data to its data as an Applicant, if available.
Tip: Comparison to SQL
In SQL, references are expressed as left outer joins. In Visier, queries are made on a single subject, so subject references allow us to reference a value from a different analytic object that matches the join criteria (key and time), if it exists.
When you create a reference between two objects in Visier, it:
- Allows you to map the ID of the referenced object from a column in your data; for example, your Applicant mapping can map the RequisitionID column to link Applicant to Requisition. This requires that your Applicant data file has a RequisitionID column.
- Allows you to add properties from the referenced object to the Detailed View visual for the first analytic object; for example, you can add Requisition ID to the Detailed View for Applicant.
-
Allows users to group or filter data in an analytic object by attributes in the referenced object; for example, you can group or filter an Applicant metric by Requisition attributes, such as grouping current applicants by requisition location.
Grouping and filtering by reverse references
In Visier, reverse references are evaluated independently from each other. This means each group by or filter is evaluated individually and any member who meets one group by or filter is included in the population, even if there are multiple conditions.
When grouping by a reverse reference, such as grouping open requisitions by application source, you can only use one group by because the platform cannot guarantee that the population with additional group bys would equal the overall value.
When filtering by a reverse reference, such as in a Breakdown of Open Requisitions by Organization filtered by Applicant > Interviewed and Applicant > Internal Applicant, the population includes all members that meet at least one filter condition, not all filter conditions. In this example, the visualization will include all applicants who have been interviewed regardless of internal status and all internal applicants regardless of interview status.
If you want your reverse reference filter to only include members who meet all filter conditions, you must create a metric with a parameter. Continuing our Open Requisitions example, to filter by interviewed internal applicants for open requisitions, do the following:
- Create a metric named Open Requisitions with Parameter.
- In the metric's Parameters tab, create a member parameter that selects the Applicant subject. Do not select a dimension. Its object name is Applicant_Attribute_Parameter.
- In the metric's Formula tab, use the following formula:
ApplicantAttribute := property(on Applicant via Requisition validUntil instant filterBy Applicant_Attribute_Parameter aggregate count(Applicant.ApplicantID))
on Requisition validUntil instant filterBy(isOpenRequisition && !isEvergreen && ApplicantAttribute > 0) aggregate count(Requisition.RequisitionID)
- Click Validate.
To check that the metric works, do the following:
- In the metric, click Preview.
- In the Visual title, click Open Requisitions with Parameter.
- Click Edit metric options.
- In the Select a metric dialog, find Open Requisitions with Parameter and click Add metric option, as shown next.
- Click Add filter, and then search for and select Interviewed.
- Click Add filter, and then search for and select Internal Applicant.
- Click Apply.
Result: The visualization updates to show the population of interviewed internal applicants for the selected time period.
Binding and non-binding references
A reference is binding or non-binding.
- Binding: A binding reference requires a value in the reference subject. Each instance of the first object must reference an instance in the referenced subject. Let's say you create a binding reference between Applicant and Requisition. Because it's a binding reference, the first object, Applicant, uses the identifier of the referenced subject, Requisition, as its own identifier to connect each applicant to a requisition. The Requisition identifier must always have a value and cannot be null. Use caution before requiring or using a binding reference. To set up a binding reference, do the following:
- In a project, on the navigation bar, click Model > Analytic Objects.
- Select the analytic object whose reference you want to make binding.
- Navigate to References and then create or select the reference.
- In the Info panel, scroll down to Settings and turn on Binding reference.
- Non-binding: A non-binding reference doesn't require a value in the reference subject. This is the default and expected behavior for most references. Let's say you create a non-binding reference between Employee and Applicant. Because it's a non-binding reference, it is not required to always have an Applicant ID connected to every employee. To make a reference non-binding, do the following:
- In a project, on the navigation bar, click Model > Analytic Objects.
- Select the analytic object whose reference you want to make binding.
- Navigate to References and then create or select a reference.
- In the Info panel, scroll down to Settings and turn off Binding reference.
Forward and reverse references
A forward reference establishes a many-to-one relationship between objects, while a reverse reference establishes a one-to-many relationship. Reverse references are generated automatically after a forward reference is created. For example, let's say that you want to create a reference between the Applicant and Requisition subjects. A requisition can have many applicants, so you create a forward reference from applicant to requisition (many applicants to one requisition, or many-to-one). The reverse reference from Requisition to Applicant is then created automatically to represent the relationship between an applicant and a requisition (one-to-many).
In the following diagram, Employee has a forward reference to the Applicant subject and reverse references to the Pay Change Events event and Employee Skills subject. Additionally, the Applicant subject has reverse references to the Employee subject and Interview event.
Let's say we have the following subjects in our analytic model:
- Employee: Data about the individuals who work in an organization.
- Employee Skills: Data about the skills that employees have.
To connect employee data with skills data, we would add the following subject references:
- A forward reference on the Employee Skills subject to the Employee subject that allows us to see the skills that employees have.
- After the forward reference is created, a reverse reference is automatically created on the Employee subject to the Employee Skills subject that allows us to see employees that have at least one skill.
The following relationships can be established in the analytic model:
- A subject can reference a subject, another subject, or itself
- A subject can't have a forward reference to an event
- An event can't reference another event
Create a reference between analytic objects
To add a subject reference from one analytic object to another, follow these steps.
- In a project, on the navigation bar, click Model > Analytic Objects.
- Select the object that will reference a different object; for example, if you want Applicant to reference Requisition, select Applicant.
- In the object, click References.
- Click Add Reference.
- In Display name, type a name for the reference; for example, Requisition.
- In Description, type a description for example, The requisition being applied for.
- In Explanation, do nothing.
- In Subject, search for and select the object to reference; for example, Requisition.
- Click Create.
Result: This creates a forward reference from the analytic object to the reference object; for example, a forward reference from Applicant to Requisition. A corresponding reverse reference is automatically created in the referenced object; for example, a reverse reference from Requsition to Applicant. For more information about forward references, see Forward and reverse references.
- Optional: If the reference is binding, select the reference and in the Info panel , scroll down to Settings and turn on Binding reference. This means that each instance of the first analytic object must have an associated value in the referenced object. For more information, see Binding and non-binding references.
After creating a reference, you can optionally adjust the analytic object's Detailed View properties to include properties from the referenced object. For instructions on how to change the properties displayed in the Detailed View visual, see Configure View Details. You can also configure the object's mappings to map columns related to the referenced object. For more information about mappings, see Add a Mapping.
When finished, publish your project to production to make the changes available to users. For more information, see Publish Project Changes.