---
title: "Tag Historian Query"
---
# Tag Historian Query
>
>
The Tag Historian Query provides a simple way to query data from Tag Historians. In the Tag Historian Query you can collect data from Historical Tags for specific date ranges, apply aggregates, and specify the sample size. It functions the same as a [Tag History Binding](visualization-and-dashboards\property-binding-types\tag-history-binding.md) and uses the same interface, so check out that page for more information on the individual properties.

## Using Parameters in a Tag History Query
The only difference between a Tag History Binding and the Tag History Query is when using indirection. In the Tag History Query, indirection is inserted directly into the Tag Path in the Selected Historical Tags section.
Assume we have a parameter named **StationNumber**:

Indirection is typically done using a parameter which like the rest of reporting, is the name of the parameter enclosed in { }. In the example below, I substituted the parameter '**StationNumber**' into my Tag Path for the number of the station. Note that you need to manually type out the name of the parameter, including exact spelling and capitalization.
Assuming base Tag Paths like the following:
```
[/.default]station 1/paint pressure
[/.default]station 1/paint fill level
```
we can replace the "1" with a reference to **StationNumber**:
```
[/.default]station {StationNumber}/paint pressure
[/.default]station {StationNumber}/paint fill level
```
