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.
Hi Community,
I have the following report:
So far I have created a measure that gives me prior year's sales amount if I select e.g the year 2013 I will get last year's amount of 2.64.
The measure is:
Solved! Go to Solution.
You can use this SPLY measure once you make these changes to your model/file.
1. Turn off Auto Date/Time in Options
2. Convert your Calendar[DateKey] to type Date instead of DateTime
3. On the Table tools tab, Mark your Calendar table as a Date table using the DateKey field to validate.
SPLY =
CALCULATE (
SUM ( Sales[SalesAmount] ),
SAMEPERIODLASTYEAR ( 'Calendar'[DateKey] )
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You can use this SPLY measure once you make these changes to your model/file.
1. Turn off Auto Date/Time in Options
2. Convert your Calendar[DateKey] to type Date instead of DateTime
3. On the Table tools tab, Mark your Calendar table as a Date table using the DateKey field to validate.
SPLY =
CALCULATE (
SUM ( Sales[SalesAmount] ),
SAMEPERIODLASTYEAR ( 'Calendar'[DateKey] )
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Use SAMEPERIODLASTYEAR() - that will work for whatever time interval you show in your visual (year,quarter, month, even day)
Hi,
Yes, you could create a measure like this:
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 |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |