• 新建文件夹,作为我的学习使用

Metabase使用教程

点击alisa_study进入下图的页面

Metabase使用教程

点击新建后

Metabase使用教程

 

Metabase使用教程

  • 新建一个custom图表

Metabase使用教程

根据需求,可以选择不同的图表类型,如bar

Metabase使用教程Metabase使用教程

Metabase使用教程Metabase使用教程Metabase使用教程

保存

Metabase使用教程

将筛选值userid和usertime设置为变量

Metabase使用教程Metabase使用教程

在safari浏览器中,这个会有一个网格背景,chrome中没有

Metabase使用教程

Metabase使用教程

这样,图表显示的数据,就是按照我们自己定义的条件查询出来

Metabase使用教程

  • 新建一个Native query图表

Metabase使用教程

select userid, date_trunc('w', days), count(*) from
(
select userid, date_trunc('d', usertime) as days, count(*) from min1
where userid = {{userid}} and usertime >= {{days}}
group by 1, 2
)
group by 1, 2

 

 

相关文章:

  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2021-06-23
  • 2022-02-20
猜你喜欢
  • 2022-12-23
  • 2021-04-30
  • 2021-08-11
  • 2022-02-07
  • 2021-07-14
  • 2022-12-23
相关资源
相似解决方案