davinci仪表盘输入框配置

输入框设置的前提式sql中有变量但是没关系----配置好后可以删除变量
配置控制器的时候自动让你选择再sql中的那维度一个字段过滤

 

选择字段:

SELECT
 "日期"
,
 sum("月活账号数量") AS "sum(月活账号数量)",sum("周活账号数量") AS "sum(周活账号数量)"
FROM (SELECT T.day as "日期",  COUNT((   CASE     WHEN (fun_code='1011010012') THEN   fun_code   ELSE    NULL   end )) as "总安装量", COUNT((   CASE     WHEN (fun_code='1011010001') THEN   fun_code   ELSE    NULL   end )) as "总注册量", COUNT((   CASE     WHEN (is_month='1') THEN   is_month   ELSE    NULL   end )) as "月活账号数量", COUNT((   CASE     WHEN (is_week='1') THEN   is_week   ELSE    NULL   end )) as "周活账号数量" FROM   (SELECT m.*, s.event_property_code,s.event_property_value FROM cms.daily_new_clientrpt_master m LEFT JOIN cms.daily_new_clientrpt_slave s on m.event_id= s.event_id ) T
where DATE_SUB(now(), INTERVAL 30 DAY) <= server_time GROUP BY "日期") T-------sql中的变量可以用表达式设置默认值

WHERE "日期" >= '2020-02-18' AND "日期" <= '2020-02-20'---输入框中条件用再套一层的方式结果基础上过滤,钻取也是如此
GROUP BY "日期"
 

davinci仪表盘输入框配置_第1张图片

 

 

选择变量:

如果选择变量,那么页面选择的值会替换变量的默认值


davinci仪表盘输入框配置_第2张图片

 

你可能感兴趣的:(davinci仪表盘输入框配置)