Differences between DATEADD and PARALLELPERIOD in DAX
HTML-код
- Опубликовано: 26 янв 2024
- The different results of DATEADD and PARALLELPERIOD in DAX may impact many other time intelligence functions that are syntax sugar of these two.
Article and download: sql.bi/827982?aff=yt
How to learn DAX: www.sqlbi.com/guides/dax/?aff=yt
The definitive guide to DAX: www.sqlbi.com/books/the-defin... - Наука
Learning from you is a continual source of joy and fulfillment.❤
Thank you, this is interesting!
The elegant formula with SelectedColum at 21:30 attracted particular attention. Wow 👍
Saludos, gracias por dedicaros horas de su tiempo de preparación continúa, gracias por en pocos minutos hacernos entender cada elemento y funcionalidades de las expresiones DAX del cuál son faro y guía mundial. Mucha salud para ambos y respectivas familias.
Interesting to see how the blank within the syntax sugar impacts the total in PREVIOUSYEAR. Thank you!
Thank you for sharing that so complete detail of time intelligence functions😊
Thank you, @Marco - great content!
Question: do you have some advice, if companies use Periods instead of Months and they don't match (for example, 4-4-5 Accounting Calendar)?
As far as I understand, all this TI beauty is not available in this case...
Use a custom calendar. Try Bravo for Power BI that generates the date table and the time intelligence calculation automatically: bravo.bi
@@SQLBI Bravo! 🙂👍
Hello, how to turn on DAX query (after the model pane)? Thanks.
Also, if terms of performance, which one is better to use dateadd('Calendar'[date], -12, MONTH) or sameperiodlastyear?
The DAX Query View is still a preview feature and must be enabled in Options / Preview.
SAMEPERIODLASTYEAR internally uses DATEADD, they are the same.
@@SQLBIthank you sir 🙂
The demos usually have a table with a date column. But I'm trying to show i.e. sales by region, with a date slicer that allows to user to select any start and end date, and for the table to show current year and previous year. How do you do that?
And the selected dates may span different years, so I don't think sameperiodlastyear works in this scenario, does it?
If you want to use the time intelligence functions, you should create a Date table if you don't have one.
This is one click away by using tools like Bravo (which is free): bravo.bi
Also use this content as a reference for your time intelligence calculations: www.daxpatterns.com/time-patterns/
sorry but i not found the Article, thanks
The article is available now