Hello:
I am looking for the simplest approach in Power BI to address a requirement to compile a week based report for a slicer-selectable reference week (and year) along with comparisons to the prior week and the same week last year, for example:
Reference Week Dates, Reference Week Sales, Reference Week Stock, Last Week Dates, Last Week Sales, Last Week Stock, Last Year Same Week Dates, Last Year Same Week Sales, Last Year Same Week Stock 19-dec-2016,635,2003,19-dec-2016,614,2003,21-dec-2015,631,1659 ...data for 90 day period... 10-apr-2017,237,2003,10-apr-2017,214,2003,11-apr-2016,258,1677
It is simple enough to assign year and week numbers through a custom column and filter... but I am unsure about:
- dynamically filtering for the prior week and same week last year
- appending the reference week / last week / last year sets of columns side-by-side, aligned by relative dates rather than calendar dates to permit valid % change comparisons etc. in a table or chart
I have looked at the articles including Week-Based Time Intelligence in DAX, and Dynamic Column Calculations based on Slicers but while standard calendar-based filters are simple enough, this compilation of week-based periods of sums and calculations is eluding me in Power BI. I could program something simply enough to put this together, but I would rather have something easily maintainable and modifiable.
Any leads would be greatly appreciated. Thanks in advance. - David Rioux.
Also, the data are in a simple table:
Reference Week,Reservation Date,Location,Reserved,Available 21-nov-2016,21-nov-2016,Location1,133,236 21-nov-2016,22-nov-2016,Location1,125,236 ... 21-nov-2016,20-mar-2017,Location1,0,236 21-nov-2016,21-nov-2016,Location2,59,64 ...