可以考虑在数据库生成时间参数和时间选项,如greenplum数据库(可直接建立数据集):
select to_char(now()-interval '1 day','yyyy-MM-dd') as a,'最新的' as b
union all
select to_char(now()-interval '1 month','yyyy-MM-dd') as a,'近一个月' as b
union all
select to_char(now()-interval '6 month','yyyy-MM-dd') as a,'近六个月' as b
union all
select extract(year from now())||'-01-01' as a,extract(year from now())||'年' as b
union all
select extract(year from (now()+interval '1 year'))||'-01-01' as a,extract(year from (now()+interval '1 year'))||'年' as b
再通过组件引用数据
可参考http://demo.yonghongtech.com:804/bi/viewer?proc=0&action=index根目录下的报告(移动端测试)