Forum Discussion
Compare YTD to same dates last year
Hi guys,
I am trying to create a barchart where I would like to show sales per month for current year with comparison to same period last year, with the possibility to drilldown to per day. The difficulty I am having is to be able to compare current month to same dates for last year current month. It sums up the whole month for last year which makes it wrong.
I have a Calendar table but I can not use it as a slicer and use SAMEPERIODLASTYEAR as I cannot add date-slicer to the report as it is supposed to be sent out on emails.
Any help is appriciated.
Samle file: https://easyupload.io/0x3jpg
5 Replies
- Greg_Deckler
Community Champion
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008- bininja
Helper I
Greg_Deckler Thanks for your quick reply. Unfortunately your solution does not look to cover my problem. I am looking for a solution on date-level but your solution look to be on month level.
- Greg_Deckler
Community Champion
TITHW covers a general technique around date filtering so the basic concept can be used for any situation. However, it is not really possible to cover the nearly limitless permutations. If you could share sample data I could be more specific. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490