如何在powerpivot sql查询中引用Excel单元格?
我试图在powerpivot查询中使用excel单元格作为筛选的参考,但我找不到正确的语法 我试图知道我需要编写什么语法才能将查询中的日期替换为excel单元格中的日期 powerpivot中的查询示例:如何在powerpivot sql查询中引用Excel单元格?,sql,excel,syntax,cell,powerpivot,Sql,Excel,Syntax,Cell,Powerpivot,我试图在powerpivot查询中使用excel单元格作为筛选的参考,但我找不到正确的语法 我试图知道我需要编写什么语法才能将查询中的日期替换为excel单元格中的日期 powerpivot中的查询示例: select c.Id, c.age from customer as c '(lets say i imported this table from the database) where c.age > 45 我试图知道如何用excel单元格替换值:45,例如:
select c.Id,
c.age
from customer as c '(lets say i imported this table from the database)
where c.age > 45
我试图知道如何用excel单元格替换值:45,例如:
select c.Id,
c.age
from customer as c
where c.age > [sheet1$a1:a1] '(this cell has the number 45 in it)
这不起作用。你能用Power Query来帮助你吗?不,因为它的语法不同。在power查询中,我们需要使用“?”,然后用所需的单元格完成“?”。在这里,我们没有这个选择。我需要具体说明我需要的单元格…为了清楚起见,我建议您使用Power Query导入数据,然后添加到Power Pivot,因为我不确定单独使用Power Pivot是否可以做到这一点。查看此链接:这是一个好主意,也是我最终使用的一个可能的解决方案,尽管我仍试图了解是否有可能在Power pivot中单独使用动态参数,并使用我尚未找到的独特语法。我相信有一种语法可以在VBA中使用。。。