Forum Discussion
GetPivotData and Time Values as Cell References
- Dec 09, 2021
I'd avoid using of implicit measures and GETPIVOTDATA(). For such sample
we may create explicit measure
Values sum:=SUM( [Value] )and return related value by
=CUBEVALUE( "ThisWorkbookDataModel", CUBEMEMBER( "ThisWorkbookDataModel", "[Table1].[Time].[" & TEXT( $K$4, "hh:mm" ) & "]"), CUBEMEMBER("ThisWorkbookDataModel", "[Measures].[Values sum]") )In the sample above time is selected from drop down list, please see attached.
I'd avoid using of implicit measures and GETPIVOTDATA(). For such sample
we may create explicit measure
Values sum:=SUM( [Value] )
and return related value by
=CUBEVALUE( "ThisWorkbookDataModel",
CUBEMEMBER( "ThisWorkbookDataModel", "[Table1].[Time].[" & TEXT( $K$4, "hh:mm" ) & "]"),
CUBEMEMBER("ThisWorkbookDataModel", "[Measures].[Values sum]") )
In the sample above time is selected from drop down list, please see attached.
- kheldarDec 09, 2021Iron Contributor
Hmm I just learnt cube functions from your post and doing research on them. Can you use them without power pivot?
=CUBEVALUE( "ThisWorkbookDataModel",
CUBEMEMBER( "ThisWorkbookDataModel", "[PivotTable4].[Hours].["& TEXT(A3, "hh:mm" ) & "]"),
CUBEMEMBER("ThisWorkbookDataModel", "[Measures].[SLA]") )This formula returns #N/A the pivot's name is PivotTable4 the field to look for is Hours and the value is SLA. The pivot is in another sheet. What am i doing wrong?
- SergeiBaklanDec 09, 2021Diamond Contributor
In general yes, Power Pivot is only interface to data model. In this case to use implicit measures or create explicit measures by right click on table name
In attached file same formula with implicit measure, it works.
- kheldarDec 09, 2021Iron Contributor
This is the layout
=CUBEVALUE( "ThisWorkbookDataModel",
CUBEMEMBER( "ThisWorkbookDataModel", "[PivotTable1].[Hour Formula].["& TEXT(A3, "hh:mm" ) & "]"),
CUBEMEMBER("ThisWorkbookDataModel", "[Measures].[SLA]") )Why do you think I still get #N/A ?