Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在powerpivot sql查询中引用Excel单元格?_Sql_Excel_Syntax_Cell_Powerpivot - Fatal编程技术网

如何在powerpivot sql查询中引用Excel单元格?

如何在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,例如:

我试图在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   
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中使用。。。