Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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:
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
104 | |
93 | |
83 | |
64 |