What happened:
Query failure on $__timeGroup(column, $Granularity) when Quarter selected.
Granularity defined as
Week = 1w, Month = 1M, Quarter = 1Q
What you expected to happen:
I expect to see results similar to date_trunc('quarter', column). This is what I experience when selected Week or Month.
How to reproduce it (as minimally and precisely as possible):
- create custom variable:
Week : 1w, Month : 1M, Quarter : 1Q
- add a panel
- Select Redshift as source
- Add following as custom query:
with time as (select GETDATE() as "test")
select
time.test
,$__timeGroup(time.test, $Granularity)
from time
- select 'Table View'
- Change variable from Week to Month to Quarter
- Upon selecting Quarter see error text:
Could not apply macros: error parsing interval 1Q
-->
Screenshots
If applicable, add screenshots to help explain your problem.
-->
Anything else we need to know?:
Environment:
- Grafana version: Cloud
- Plugin version: 1.18.0
- OS Grafana is installed on: N/A
- User OS & Browser: Mac Sonoma 14.5 / Chrome
What happened:
Query failure on $__timeGroup(column, $Granularity) when Quarter selected.
Granularity defined as
Week = 1w, Month = 1M, Quarter = 1Q
What you expected to happen:
I expect to see results similar to date_trunc('quarter', column). This is what I experience when selected Week or Month.
How to reproduce it (as minimally and precisely as possible):
Week : 1w, Month : 1M, Quarter : 1QCould not apply macros: error parsing interval 1Q-->
Screenshots
If applicable, add screenshots to help explain your problem.
-->
Anything else we need to know?:
Environment: