Reporting M-N Metrics by Multiple Tags
The following procedure is applicable to XAE versions 1 and 2. It is advised to upgrade XAE to version 3 for improved handlng of M:N. See Many-to-Many in Logical Data Models for more details.
This article expands upon Reporting M-N Metrics by Tag that describes how to create reports filtered by a single, specific tag in a M:N data model.
Suppose you want to extend the first M:N report you created to be filtered by an additional tag. In the help desk example, you might want to further filter the report by the bug_report tag value, which identifies help tickets that are addressing bugs.
Load the report you created in this Reporting M-N Metrics by Tag. If you want to retain that report, create a copy of it and complete the remaining steps here.
Similar to the # Tickets w/Customer metric you created in the previous report, you must create a metric for the second filter. In this case, create the # Tickets w/Bug Report metric, which should look like the following:
SELECT # Tickets WHERE Ticket Tag = bug_report
As in the previous report, the # Tickets w/Bug Report metric is not added to the report through the What pane. Instead, it is referenced as a report filter in the Filter pane:
The report now displays values for the metrics in it, filtered by the presence of the Ticket Tag = customer and Ticket Tag = bug_report attribute values.
The filters are additive. Metric values are included in the report only when both filters evaluate to true. In this case, the filters are instructing the application to examine each ticket for the presence of Ticket Tag = customer . If it is found, the returned value for the count metric is 1 for Filter #1. The same method is applied for Filter #2, looking for Ticket Tag = bug_report .
Filters are applied in the order they are listed. The application first filters the available tickets for customer tags. Then, from that result set, an additional filter is applied to detect for the presence of the bug_report tag. If both filters return 1, then both filters are true, and the data associated with the metrics in the What pane are included in the report. As a result, all tickets included in the report have both tags.