This article documents some of the more common advanced functionality of FoodLogiQ Embedded Analytics.
Adjusting Date Granularity (Truncating Dates)
When you initially build a graph with a time-based element on the X-Axis, it will default to using days as the X-Axis increment. If you are looking over longer time periods and/or have high variance day to day, a daily increment may be too specific - you may want to convert to looking at weeks, months, over even years.
To do this, utilize the Truncate Date function by selecting the down arrow to the right of the X-Axis column
This will reformat the X-Axis based on the preferred time granularity, for instance, looking at the same graph above month-over-month:
Adding Columns from Other Tables (Lookups)
Much of the FoodLogiQ data in Embedded Analytics is relational; this means that there are separate tables of data in the database that contain information about different objects; for example. incidents contain information about quality management issues, while products and locations hold the full master data for each item.
There are times when it may be helpful to join information from one table to another; for instance, if you are looking to display some product-level information on an incident chart, you would need to combine the necessary columns from the products table to the incidents table. This essentially operates the same way a VLOOKUP would in Excel.
Let's say we want to compare the number of incidents by the country of the incident location. The country is not part of the incidents collection, but is part of the locations collection.
To start, we'll use the Incidents Fact as our data source, which will make the incidents columns available from our graph.
By clicking the + icon on the Add Column row, we can add a new column to this table via lookup.
A new window appears asking for the necessary information to perform the lookup, namely:
- The other data source and desired columns; note you can add multiple columns from a data source in this action.
- The linking data between the two tables - for FoodLogiQ, this will be found by using the common IDs for the items which are found in each table.
The example below shows how to include the country information from the Locations collection.
After clicking Done, we can now use the Country as any other column in our incidents table.
Showing Multiple Series on the Same Graph
A common use case is to track multiple items on the same graph, for instance, comparing how different locations, suppliers, or distributors are trending over time. While users may choose to create separate graphs for each instance, seeing everything on a single graph allows for easy comparison between values.
To accomplish this, we are going to use the Color capability on the Properties subtab.
Let's say, for instance, we want to compare over time how the incidents were added to the FoodLogiQ platform utilizing the Create Source attribute. We will build a standard graph (Created on the X-Axis, ID of the incident on the Y-Axis), and then use the Color capability to group by an attribute.
In the Color dropdown, switch from a Single Color to By Category to enable us to choose a column.
You can now select the desired grouping column by selecting the + icon under the By Category option.
After adding the column, we now see multiple lines grouped by the Create Source column! Note that you can completely customize the line colors, legend and more.
This also works similarly for Stacked Bar or Stacked 100% charts.