BI 5.1,或者可以通过仪表板界面实现这个切换sql
${if(cs=1,"sq1","sq2")}
修改
${if(cs=1,"select * from tb where a='"+a+"'","sq2")}
${if(cs=1,"select * from tb where a in ('"+a+"')","sq2")}
那这样需要保证两段SQL字段必须相同才行,而且默认要执行一端SQL才行
实时数据(直连):
https://help.fanruan.com/finebi5.1/doc-view-85.html
[直连]文本过滤组件传参:
https://help.fanruan.com/finebi5.1/doc-view-381.html