cube-js / cube-js/cube

Cube filters with the time dimension are not working

Open
#7,536 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
I use the timeDimension by year, and then I also apply filters with 'notEquals,' where the member still belongs to the same field as the timeDimension. Now, after querying, the returned data is in 'all' format, but the filters have not been applied. I have tried with 'equals,' and it works normally.

**To Reproduce**
Steps to reproduce the behavior:
1. Select timeDimention by Year
2. Select measure sum number
3. Select dimensions string
4. Run build in playground

**Expected behavior**
The returned results are as if the filters have not been applied.

**Screenshots**
![image](https://github.com/cube-js/cube/assets/12721256/3bc717c0-6865-4810-b649-da554f4404ef)

**Minimally reproducible Cube Schema**

```javascript
{
"dimensions": [
"tbl_lbklptj2d7s_6gl1j.AreaName"
],
"order": {
"tbl_lbklptj1wzh_ng7yt.Product_Price_sum": "desc"
},
"limit": 100,
"measures": [
"tbl_lbklptj1wzh_ng7yt.Product_Price_sum"
],
"timeDimensions": [
{
"dimension": "tbl_lbklptj1wzh_ng7yt.DateKey",
"granularity": "year"
}
],
"filters": [
{
"member": "tbl_lbklptj1wzh_ng7yt.DateKey",
"operator": "notEquals",
"values": [
"2017-01-01"
]
}
]
}
```

**Version:**
[0.32.3]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.