> For the complete documentation index, see [llms.txt](https://attr.sygnal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://attr.sygnal.com/sa5-calc/article/future.md).

# Future

Progression;

* Very simple calcs ( SUM, COUNT, etc. )&#x20;
  * Single-pass
  * < 100 items as data source ( or multiple collection lists )&#x20;
* More complex calcs ( STD, AVG, etc. )&#x20;
* More complex sourcing
  * Other SA5 data sources&#x20;
  * FS Load&#x20;
* Grouping and rollups&#x20;
  * Arbitrary groupings
    * Multiple tiers possible
* Crosstabs, matrices, etc. &#x20;

## Progressive Data Source Definition ( DSD )&#x20;

Define a source using SA5 Data standards, or else a new arbitrary standard which is based on e.g. CSS Queries and Attributes.&#x20;

Concept;&#x20;

```html
<sa5-data-source
  name="price"
  selector=".item[data-price]"
  attr="data-price"
  ></sa5-data-source> 
```

Or;

* source from internal content
* source from internal secondary selector&#x20;

Transform;

```html
<sa5-data-source
  name="price-group"
  transform="group"
  data-source="price"
  selector=".item[data-price]"
  attr="data-price"
  >
  {
    ["group name 1", "lt", 1000],
    ["group name 2", "between", 1001, 1000],
  }
  </sa5-data-source> 
```

## Grouping Concepts

Allow a single item to match multiple groups. This gives flexibility and puts the definition rules on the user.

* lt, lte
* gt, gte
* between - > >= < <=&#x20;

Auto calculate count

Auto calculate sum&#x20;

Consider referencing grouped elements as their own data source for other purposes&#x20;

### Challenges

Consider range grouping approaches - between, > >= < <=&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://attr.sygnal.com/sa5-calc/article/future.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
