Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm not sure what '.[Date]' means in the following expression.
PY Sales=CALCULATAE(SUM(Sales[Sales]),DATEADD('Calendar'[Date].[Date],-1,YEAR))
Any help would be appreciated.
Solved! Go to Solution.
When you don't have a custom date table and are using Power BI's built in dates for time intelligence, each date column automatically gets several fields associated with it so that you can access different date parts.
'Calendar'[Date].[Year] would return the year portion of the date, for example.
In the formula you show then the .[Date] portion is redundant as it will just return the same value as 'Calendar'[Date], so you could replace the formula with
PY Sales=CALCULATE(SUM(Sales[Sales]),DATEADD('Calendar'[Date],-1,YEAR))
When you don't have a custom date table and are using Power BI's built in dates for time intelligence, each date column automatically gets several fields associated with it so that you can access different date parts.
'Calendar'[Date].[Year] would return the year portion of the date, for example.
In the formula you show then the .[Date] portion is redundant as it will just return the same value as 'Calendar'[Date], so you could replace the formula with
PY Sales=CALCULATE(SUM(Sales[Sales]),DATEADD('Calendar'[Date],-1,YEAR))
Thanks for the clarification.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
96 | |
79 | |
67 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |