Forum Discussion
Comparing Daily Trend Year On Year
- 9 years ago
Hi RobinW2,
According to your description, I suppose you are using the following formula to generate the Lastmonth measure?
Comparison_before := calculate(sum('Table'[comparison]), PARALLELPERIOD('Table'[Date],-1,MONTH))
Please take a try to switch the PARALLELPERIOD function to DATEADD, then check to see if this would make it work.
Comparison_before := calculate(
sum('Table'[comparison]),
DATEADD('Table'[Date],-1,MONTH)
)
Regards
Hi RobinW2,
Apologize for the late response. This might be related with the DATEADD function. DateAdd function only returns a single column of Datekey which overwrites existing filter on the same column.
I would try to create some tests on this, will share the results once I finished.
A blog for reference:
http://mdxdax.blogspot.sg/2011/01/dax-time-intelligence-functions.html
Regards
Hi Michael,
I hope you're well and thanks a lot for coming back to me. I have actually fixed the answer by extending the dates after my last date on the excel file from which I pull the data.
It seems that Power BI was automatically recognising the September 2016 data as a full month (as there was no date beyond the 25/09 initially) and replicating this set up on the 2015 comparison.
Thanks for your help!
Robin.
- v-micsh-msft9 years agoMicrosoft Employee
OK。
Thanks for sharing this.
If any further questions when using Power BI, please feel free to post in this forum.
Regards