Turn on more accessible mode
Skip to main content
Turn off more accessible mode
PowerPivotPro's FAQ Site
Sign In
|
PowerPivotPro's FAQ Site
This Site
This List
PowerPivotPro's FAQ Site
>
The Great PowerPivot FAQ
>
The Time intelligence functions does not return results
The Great PowerPivot FAQ
: The Time intelligence functions does not return results
Title
The Time intelligence functions does not return results
Answer
When using Time intelligence functions like LASTDATE or DATESMTD it is necessary to add another argument which is ALL (TimeTable). Without this, only the selected dates are considered.
Example:
=CALCULATE(sum(‘FactInternetSales’[OrderQuantity]),DATESYTD(PREVIOUSYEAR(‘DimDate’[FullDateAlternateKey])),ALL(‘DimDate’))
This gives the ytd of the previous year.
You could also add separate time table which you can relate to your other tables, use a date column to create the relationship. When you do this the additional argument isn't necessary.
More on this at:
http://www.powerpivotblog.nl/powerpivot-time-intelligent-functions-revisited-why-use-all-and-how-to-work-around-it
Client/Server
Client
Topic
F - Calculations (DAX)
Purpose
Troubleshooting
Answered?
Yes
Contributor
Kasper de Jonge
Título
As funções de tempo não retornam os resultados esperados (CTP)
Resposta
Quanto se está usando funções de tempo (Time) inteligentes como LASTDATE ou DATESMTD, no CTP3, é necessário adicionar outro argumento que é o ALL (TabelaTempo) ( ALL (TimeTable)). Isto não será necessário após o CTP3. Sem isto, apenas as datas selecionadas são consideradas.
Exemplo:
=CALCULATE(sum(‘FactInternetSales’[OrderQuantity]),DATESYTD(PREVIOUSYEAR(‘DimDate’[FullDateAlternateKey])),ALL(‘DimDate’))
Isto resulta no ydt do ano anterior.
Frage
Die DAX "Time Intelligence functions" liefern keine Ergebnisse!
Antwort
preRTM
Attachments
Created at 1/2/2010 1:50 PM by Kasper de Jonge
Last modified at 4/23/2010 1:24 PM by Jochen Juelke
Use this page to add attachments to an item.
Name