Forum Discussion
Queries with overlapping date periods
- 6 years ago
Your data is too scarce to repro the full issue. for the "need to build a view showing metrics over a 45-day period, shifted weekly" you can probably create a calculated table first then add the measure:
date = var k = ADDCOLUMNS(FILTER(CALENDAR(DATE(2019,01,01),DATE(2020,01,08)),WEEKDAY([Date],2)=3),"date end",[Date]+44) return kWeeks back = CALCULATE(COUNTROWS('date'),FILTER('date',[Date]>=EARLIER([Date])))-1I can't figure out where the metrics info from, but you can manage the calendar table with your data to calculate them automatically.
Pbix attached.
I think we should allocate the data at day level work on it.
Refer, how to allocate at Day level, Look for Table Daily Allocation: https://www.dropbox.com/s/fnq82ksdzk1lqs3/Target_allocation_daily.pbix?dl=0
Refer, how to work with rolling weeks
https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0
No, this will not work, unfortunately. The nature of the data I'm working with is such that 45 day period != sum total of 45 individual days, I need to ingest the data as one "block" of 45 days, not as 45 individual blocks of 1 day each.
Not sure if it makes sense but that's about the best way I can explain it 🙂