Forum Discussion
Anonymous
7 years agoNot applicable
YOY Line Chart
Hi, I have a table similar to below structure, let's call it Raw_Data. My data has complete booking date values and contains duplicate booking dates. Now, I want a line chart with ...
v-juanli-msft
7 years agoCommunity Support
Hi Anonymous
How about copying the [date] column which is added to the axis of chart, then add this copied column in the silcer.
Best Regards
Maggie
Anonymous
7 years agoNot applicable
v-juanli-msft, thanks for the help but find a workaround on this issue and below is the solution that works for me.
Here's the solution that works for me.
Added a New Measure using this formula
Total Revenue = SUM (Raw_Data[Revenue])
Then added another New Measure for sameperiodlast year
Total Revenue (Previous) = CALCULATE([Total Revenue], SAMEPERIODLASTYEAR('Date'[Date]))Below shows YOY Line Chart with trendline and is filterable by dimensions in the table.
Remaining issue is how can I offset the last year's data so the peaks and lows fall on the same day.
Tried creating a New Column for offset date and use it to calculate last year's revenue but it can't be plotted against 'Date'[Date].