Cannot pre-aggregate rolling measure with `count_distinct`
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Describe the bug**
Trying to pre-aggregate a rolling_window measure give the error ` Error: Time series queries without dateRange aren't supported at BaseTimeDimension.timeSeries... `
**To Reproduce**
Create a measure with a rolling_window with a trailing start, create a pre-aggregation for it.
**Expected behavior**
I expect the pre-aggregation to function correctly.
**Minimally reproducible Cube Schema**
```javascript
cube(`session`, {
sql_table: `test_db`,
data_source: `default`,
measures: {
weeklyCount: {
sql: `id`,
type: `count`,
rollingWindow: {
leading: `1 week`,
offset: `start`,
},
},
},
dimensions: {
created_at: {
sql: `${CUBE}."created_at"`,
type: `time`
}
},
preAggregations: {
main: {
measures: [session.weeklyCount],
timeDimension: session.created_at,
granularity: `day`
}
}
});
```
**Version:**
0.34.50
**Additional context**
Using PostgreSQL, but might be the same issue as #6813 who is using MS SQL
Contributor guide
Assessment
This issue has not been assessed yet.