Forum Discussion
Anonymous
5 years agoNot applicable
Comparing Previous Year vs Current Year-Month
Imagine we have data like so, Range: Jan 1st 2013 - March 1st 2014 Date: | Units 1-Jan-2013 | 100 2-Jan-2013 | 100 . 1-Mar-2013 | 100 . 1-Feb-2014 | 100 2-Feb-2014 | 100 . 28-Feb-201...
v-jingzhang
5 years agoCommunity Support
Hi Anonymous
Assume you have a Date table in your model, you can create a measure like below to achieve that. Download this PBIX file for more details.
Previous Year SUM / Month SUM = DIVIDE(CALCULATE(SUM(TestData[Units]),DATESINPERIOD('Date'[Date],MIN('Date'[Date])-1,-1,YEAR)), SUM(TestData[Units]))
BTW, to get the "% of previous year by year-month", it seems the numerator and denominator should exchange their places (e.g. 2800 / 36500).
Kindly let me know if this helps.
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.