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.
When creating a Calculate function with SAMEPERIODLASTYEAR Power BI returns the same values as the current period when using a custom YEAR-MONTH hierarchy.
As a measure I use Verkoopwaarde SPLY = CALCULATE(SUM(Sales[Sales]),SAMEPERIODLASTYEAR(Date[DATUM].[Date]))
When I create the same measure with the date column (Power BI then creates its own hierarchy) the correct values are returned.
How is this possible? Any Ideas?
@Anonymous
When using SAMEPERIODLASTYEAR function, you must use a date column with contigous, unique date values. It can't evalute expression like [column].[Date] as contigous dates. So please always directly put the date column in any time intelligence function.
Regards,
I guess since SAMEPERIODLASTYEAR function requires a column containing dates. When you use the date column in your Date Table to do the calculation, you need to use the same date key column or hierarchy in the Date table to visual to show the correct data.
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |