【问题标题】:Is there a way to input a date in my GETPIVOTDATA function?有没有办法在我的 GETPIVOTDATA 函数中输入日期?
【发布时间】:2019-05-16 16:54:21
【问题描述】:

正如预期的那样,我一直在通过另一个 Excel 中的数据透视表来获取我的价值观。我正在尝试使其自动化,以便该函数从另一个单元格中的某个日期提取。

我的 M27 的值为 2019-05-13。如果我希望我的函数选择从单元格中提取的日期,我将如何做到这一点?

=GETPIVOTDATA("[Measures].[Sls_Fcst_GL_Local]",'[Sales and Labor CUBE.xlsx]Sales, Labor & Productivity'!$A$3,"[Time_Period].[Time_Period]","[Time_Period].[Time_Period].[Date].&[**2019-05-13**T00:00:00]","[Region_Road].[Region_Road]",

============================= 理想情况下应该是这个样子

=GETPIVOTDATA("[Measures].[Sls_Fcst_GL_Local]",'[Sales and Labor CUBE.xlsx]Sales, Labor & Productivity'!$A$3,"[Time_Period].[Time_Period]","[Time_Period].[Time_Period].[Date].&[**M27**T00:00:00]","[Region_Road].[Region_Road]",

感谢您的帮助。

【问题讨论】:

  • 使用适当的语法...类似于合并一个单元格,=A2&" "&B2 会将 A2 和 B2 的值合并为一个字符串,中间有一个空格,您需要通过以下方式查看 M27在公式中附加一个 & 符号,例如,"&M27&"

标签: excel excel-formula excel-2010 pivot-table


【解决方案1】:

=GETPIVOTDATA("[Measures].[Sls_Fcst_GL_Local]",'[Sales and Labor CUBE.xlsx]Sales, Labor & Productivity'!$A$3,"[Time_Period].[Time_Period]","[Time_Period] .[Time_Period].[Date].&["&M37&"T00:00:00]","[Region_Road].[Region_Road]",

非常感谢 Cyril,这很容易解决。脑袋放屁了。

【讨论】:

    猜你喜欢
    • 2011-08-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-30
    相关资源
    最近更新 更多