Sigma Online User Manual

Linking Query and Sub-Query Filters in EI

Energy Intelligence Reports can be created with Queries and Sub Queries, generally when you want to show two (or more) different types of data.  For instance, you could create a Report that shows the consumption this year, compared to the same period 12 months ago.  The report would have a Sub Query to show the second set of data (12 months ago) and the Filters can then be linked.

For more information on creating Filters, click on the link below:

Filtering options in Energy Intelligence


Linking Filters in a Master Query and Sub Query

When you have Sub Queries, you may need to link the Filtering so that when a Master Query is changed, it affects the Sub Queries.

A Master Query and Sub Query(s) is used where you have the same data, but for different periods, commodities etc.  For instance, if you are using a date range, the Master Query  may be filtered to This Calendar Year and you want the Sub Query as This Calendar Year minus one year.  Or you may want a column for the Gas, Electricity and Water  - this would require a Master Query and 2 Sub Queries.

Edit the Report and click on the Data tab, which will open the Report on the Master Query.  Some Filters will be greyed out (they are attached to a Sub Query).

To move between the Master Query and a Sub Query, hover over the Icons on the left hand side to see the name of the Sub Query, then click on the Icon.

    


Note : both columns currently show the same data as no Date filtering has been set

    


Start with the Master Query

  • If the Filter has not already been added, drag and drop into the Filter Section (Date for instance)
  • Click on the downward arrow on the Date 
  • Hover over Value
  • Click Define Value
  • The Select Filter Value popup is displayed
  • Choose Pre-defined Period and use the dropdown to select the time band required, ie This Calendar Year, Last Financial Year etc
  • Change the radio button to Defined Value
  • Click Submit

         


The Report will refresh and the Master Query will display the filtered data (ie, This Calendar Year), but the Sub Query will still show all data (up to 5 years old)


  • Next change and link the Filtering on the Sub Query
  • Click on Advanced Settings at the bottom of the Filters Section

         


  • Using the Sub Query tab (ie the previous year), change the Date operand to Link to Filter 

         



  • Then click on Define Link to open the Link to Filter popup

          



  • Leave the data Operator as Same Operator
  • Choose from the dropdown in the Link to Filter  (Choose Date - that is the Date in the Master Query)
  • Change the Offset to what is required, for instance - 1 year.  This will give you minus one year from the date range in the Master Query, ie This Calendar Year Vs the Last Calendar Year.  

The advantage of linking the filters is that they are always going to work together, so when the year changes, both filters will change


This returns you to the Configure Filters popup

  • Click on the small X on the right hand side to exit the Configure Filters popup.

Notice that the data now showing the Sub Query has changed to show the same as the data in the Master Query, less 12 months.



@ Copyright TEAM - Energy Auditing Agency Limited Registered Number 1916768 Website: www.teamenergy.com Telephone: +44 (0)1908 690018