Microsoft Power BI Complete Reference
上QQ阅读APP看书,第一时间看更新

Time intelligence

Another advantage of Power BI is how easily time intelligence can be added to your data model. Within data analysis expressions (DAX), you have a comprehensive list of built-in time intelligence functions to make this very easy. In this section, you are going to use these built-in functions to create the following measures:

  • Year to Date Sales
  • Year to Date Sales (Fiscal Calendar)
  • Prior Year Sales
Built-in time intelligence calculations do not work if you are using a direct query connection to your data source rather than importing data. Take a look at the alternative methods for calculating time intelligence in the DAX cheatsheet at  https://tinyurl.com/pbiqs-daxcheatsheet .