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 everyone,
Just quickly reopening this thread as I am facing a new issue with the formula that calculates YoY data.
The formula is as follows:
Sessions Prev. Year = CALCULATE(SUM('Traffic'[Sessions]), DATEADD('Traffic'[Date Right Format], -1, YEAR))
However, when applying filters for half a month (e.g. 01/09 to 15/09), the previous year data calculates the whole September month rather than only for this data range.
Would anyone know what is causing the issue?
Thanks.
Robin.
Thanks for posting this - this definitely worked with the DATEADD - I then showed a YoY for the month using the Area Chart and selected the month itself (but used DateKey) DateKey being from my Date Dimension table .