Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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 |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |