Forum Discussion
Display data for same period last year
I currently have a line graph with week numbers on the x axis and sales on the y axis to see the sales trending over time. My data goes back a year so I have 2018 to 2019 data to-date.
I also have a slicer for dates if a user is only interested in a specific period.
Is it possible for someone to select a period in 2019, and for the line graph to also display the same period for 2018 as well?
Thanks
afk
2 Replies
- v-eachen-msftCommunity Support
Hi bo_afk ,
You could use DATEADD and LOOKUPVALUE function to do it.
Here is the result.
Here is my test file for your reference.
- bo_afkPost Patron
Thanks for your suggestion. Whilst it works in your example, there are additions to my dataset. I have a number of other columns, which are namely categories, each with their own value for each date, thereby repeated dates. So therefore the formula is unable to do a lookup since there are multiple results of the value it's looking up.
Is there a way to do this via a measure as my data will be subject to slicers/filters so it won't remain static.