Forum Discussion
Rubal_Islam
Helper II
4 years agoAutomate Trailing 12 months Sales formula
Hi All, I have two formulas that compare the base period (months) with the trailing 12 months of average energy consumption. Base formula: July 2017 to June 2018 (this is always static) Ba...
- 4 years ago
After Date function where you are getting today's Date subtract with 30 get the previous month Date and it should work
VijayP
Community Champion
4 years agoAfter Date function where you are getting today's Date subtract with 30 get the previous month Date and it should work
- Rubal_Islam4 years ago
Helper II
Hi VijayP,
The below formula did the trick and it works like magic.
Comaprison Energy Usage v2 = CALCULATE(AVERAGE(Data_Source[kWH]),DATESINPERIOD('Date'[Date],DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())-30),-1,YEAR))Thank you very much. - VijayP4 years ago
Community Champion
Rubal_Islam Share your Kudos as well by clicking on 👍 Icon!