Before You Begin
Like the DETAIL.GRID object, the TIME.COMPARISON.GRID object require some manual editing of the dashboard or scorecard before it will work. You should check ahead of time that you have permissions in MITS to manually edit dashboards. Also, you’ll want to be comfortable working in HTML, MWML (MITS Web Markup Language), and MQL (MITS Query Language).
Understanding the TIME.COMPARISON.GRID dashboard object
The TIME.COMPARISON.GRID dashboard object displays two timeframes (called “eons” in MITS vocabulary), shows a trend or difference calculation between them for two time periods, and displays them on a grid. Here is an example from a customer scorecard showing the rep’s activity for this year to date, last year, and a trend between them. Notice the trend column is also color coded similar to the way a stoplight dashboard object works.
You are not limited to just having just Trend or Difference. Here is an example that has both Trend and Difference. We’ve also added one more year for comparison.
As with most MITS objects and reports, when there is available data for further exploration, a link is provided. Notice the blue links in the example above. Anything in blue text can be clicked to discover supporting information.
The Requirements
For the TIME.COMPARISON.GRID you need:
- MITS Discover version 10.2 or higher
- Two EONS that have been created by the EON loader
- At least one Metric row - from a column template
- The Column template must use only one EON in the ID
You can add:
- TREND or DIFFERENCE columns
- EONS preceding or following the main columns of the object - EONS must be created by the EON loader
You can't use:
- Related File Fields (bang fields)
- Calculated Columns other than TREND or DIFFERENCE
- Any columns created by column maintenance or custom columns created for you by MITS
- Any columns created using column templates that have zero or more than one EON in the ID
The Basic Template
There is not a wizard for creating the time comparison dashboard object. It must first be added in the manual edit mode of the dashboard or scorecard. Once the minimum elements of the object have been added, the object can be modified using the visual editor.
Below is the minimum template to get a TIME.COMPARISON.GRID on to a dashboard. The items in red are elements that must be replaced with actual data before adding it to the dashboard code.
{TIME.COMPARISON.GRID
APP="CUBENAME"
GENERATE.ROOT.PATH="YES/NO"
HEADING="Display name of the object"
A.EON.ID="EON 1"
B.EON.ID="EON 2"
DIFFERENCE="YES/NO"
TREND="YES/NO"
{TIME.COMPARISON.ROW
{COLUMN.TEMPLATE.ITEM DESCRIPTION="Name of the type of metric"}
}
}
Here is an example with the elements swapped for actual values. These are just examples. This exact object by not work on your system.
{TIME.COMPARISON.GRID
APP="SALES"
GENERATE.ROOT.PATH="YES"
HEADING="Sales Rep Performance"
A.EON.ID="YTDLME"
B.EON.ID="YTDLME-1"
A.HEADING="This Year"
B.HEADING="Last Year"
DIFFERENCE="NO"
TREND="YES"
{TIME.COMPARISON.ROW
{COLUMN.TEMPLATE.ITEM DESCRIPTION="Sales"}
}
}
Populating the Template
The easiest way to get the information you need to populate the object is to create a report and copy the MQL to a text editor. This will allow you to see and copy the various elements needed.
Here is what that object would look like.
And here is a report we could use to get the elements we want for the object.
This is the MQL for that report.
FLASH SALES WITH R = "1013" INVOICED.AMT.YTDLME INVOICED.AMT.YTDLME-1
With that MQL, we can begin to fill out the template for the TIME.COMPARISON.GRID.
{TIME.COMPARISON.GRID
APP="SALES"
GENERATE.ROOT.PATH="YES"
HEADING="Sales Rep Performance"
A.EON.ID="YTDLME"
B.EON.ID="YTDLME-1"
DIFFERENCE="NO"
TREND="YES"
{TIME.COMPARISON.ROW
{COLUMN.TEMPLATE.ITEM DESCRIPTION="Sales"}
}
}
The APP name is the name of the cube the data is being pulled from. Here it is SALES.
GENERATE.ROOT.PATH is a method that MITS uses to insert additional drill down path components. The setting in your object should match the setting for the dashboard or scorecard. You’ll find this information at the top of the MWML for the dashboard. It will look like this:
GENERATE.ROOT.PATH="YES"
Heading is the name to be displayed for the object.
A.EON.ID is the first of the two times to be compared. This can be found in the MQL of the report. Look at the columns and you’ll see they end in an eon. It could be M, P, Q, Y or variations on that. In this case, our A eon is YTDLME (Year To Date Last Month End).
B.EON.ID is the second of the two times to be compared. Our example uses YTDLME-1 (Year To Date Last Month End back one year).
DIFFFERENCE and TREND enable and disable these two columns with Yes and No. Here we have Difference disabled and Trend enabled.
COLUMN.TEMPLATE.ITEM DESCRIPTION tells the object which group of columns to use. You can find this by opening the Column Selector in a report. Each of the groups is a column template description. Examples from this screenshot would be Average Sales, Cost, or Invoice Count.
Placing the Object
It can sometimes be tricky to get the placement within the MWML correct. Perhaps the easiest way is to use the visual editor to place a marker within the MWML code. In this case, we’ll use two horizontal lines. They are easy to add in the visual editor and leave a clear bit of code to find in the MWML.
In the visual editor of your dashboard, add two Horizontal Lines and place them next to each other. In the visual editor, it will look like this.
Switch to the manual editor and those two horizontal lines will look like this.
<hr />
<hr />
These two tags represent the beginning and end of where you want to place the object. Even if it isn’t the final placement for the object on the dashboard, this will help you get the object into the code. Once there, you’ll be able to edit the object using the visual editor.
Copy the template you modified to contain the minimum code and place it after the first <hr /> and before the second one.
<hr />
{TIME.COMPARISON.GRID
APP="SALES"
GENERATE.ROOT.PATH="YES"
HEADING="Sales Rep Performance"
A.EON.ID="YTDLME"
B.EON.ID="YTDLME-1"
DIFFERENCE="NO"
TREND="YES"
{TIME.COMPARISON.ROW
{COLUMN.TEMPLATE.ITEM DESCRIPTION="Sales"}
}
}
<hr />
At this point, you can switch to the visual editor and see your object on the dashboard.
Using the Visual Editor
Now the object has been placed on the dashboard, you can use the visual editor to change most aspects of the object. In the visual editor for the dashboard, hover your mouse over the object and click the blue pencil icon to access the object’s visual edit mode.
Once in the visual editor for the object, you’ll have the following options.
Header: The title displayed on the object.
Time Periods: These define the two time periods (eons) to be compared.
Main: The first eon. This is a drop-down box of the available eons. The AS: allows for a reader friendly name, like “This Year” to be displayed.
Compare to: The second eon. It works the same as the Main.
Difference: Enables the display of a column showing the difference between the two eons.
Trend: Enables the display of a column showing the difference between the two eons.
For Reference: This drop down allows for the display of a third eon if desired. It is not used in the Difference or Trend calculations. Like the other two eons, the AS: box can be used to provide a different column header.
For Reference Side: Determines the placement of the Reference column relative to the Difference and Trend columns.
Metrics: Adding metrics will add rows to the object. Additional metrics can be from any of the column groups in the cube provided they meet the same criteria listed in the Requirements section above.
Individual Metric Rows have additional options accessed from the Modify link in the Actions column.
Row Label: Allows you to override the default row label.
Metric: A drop down menu that allows you to change the base metric of the row.
Hide: Controls if the Difference or Trend value for that metric is displayed.
Colors: Causes the metric to change colors based on the values entered. There are several color options available in the drop-down menu. Once one is selected, an additional display (like the red and green one above) is presented and the threshold values can be entered here. This is similar to the stoplight object.
Report Link: Allows for specific MQL to run when the Trend or Difference links are clicked.
Comments
0 comments
Article is closed for comments.