Forum Discussion
Nemes
8 years agoFrequent Visitor
Issues with measure using time intelligence
Hello, I've been running into issues when creating measures, particularly with time intelligence (for example SAMEPERIODLASTYEAR). Here is a stripped down version of my report, with only the ...
- 8 years ago
How about this one
Total Amount Last Year = CALCULATE ( [Total Amount], SAMEPERIODLASTYEAR ( 'Dates'[Date] ), ALL ( Dates ) )
Nemes
8 years agoFrequent Visitor
Hi Ashish_Mathur,
This also works, although like the inclusion of the optional ALL(Dates) filter, I don't understand why this step is required.
Usually, using a date key of format YYYYMMDD is the recommended practice for a datawarehouse. Is there some sort of limitation in Power BI for date relationships where it needs to be an actual date field instead of a surrogate key of format YYYYMMDD?
Ashish_Mathur
8 years agoSuper User
Hi,
PowerBI's data and time intelligence functions only work with actual date entries. Which is why your formula (without any editing) started working when i converted a text entry into a Date and then built the relatiosnhip.