I created a Tabular data warehouse using AdventureWorks2012. However I repeatedly get errors when trying to crate measures in the date table or any other using the date table. For this following expression;
I get a error message stating - values for Internet Sales Amount -- cannot be determined in the current context.
and some cases state Date table cannot be found but some basic measures in Date table works.
Has limited DAX knowledge or pretty basic skill in the related area, appreciated help from the experts please.
This post looks like it belongs in the Power Pivot or SSAS forums but...
You are receiving this error because the CALCULATE function is expecting a scalar expression for the first parameter. In this case you need to aggregate the values in the InternetSales[SalesAmount] column in some way so that it returns a scalar value.
Your above calculation should work if you update the DAX formula to the following:
SomeMeasures:= CALCULATE( SUM(InternetSales[SalesAmount]), LASTDATE('Date'[FullDateAlternateKey]) )
You can read more about the CALCULATE function here in the official TechNet library: http://technet.microsoft.com/en-us/library/ee634825.aspx
Hope this helps.