Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have sales data mapped by region and week. I can create a table of sales by week (columns B to H below) but please can you tell me how to create the rolling to date average for the trial period (columns I to O) (i.e. column K is the average of the first 3 weeks, column O is the average of the first 7 weeks). The table will need to expand automatically as data is added for new weeks.
Thanks,
CM
Solved! Go to Solution.
In this scenario, you can create an "Average to Date" measure. But this measure must be along with each week sales, which means it can only appear within each column group. We can't have all measure results appear in another matrix next to the initial matrix.
Average to Date = CALCULATE ( AVERAGE ( Table5[Sales] ), FILTER ( ALL ( Table5 ), Table5[Week] <= MAX ( Table5[Week] ) && Table5[Region] = MAX ( Table5[Region] ) ) )
Regards,
In this scenario, you can create an "Average to Date" measure. But this measure must be along with each week sales, which means it can only appear within each column group. We can't have all measure results appear in another matrix next to the initial matrix.
Average to Date = CALCULATE ( AVERAGE ( Table5[Sales] ), FILTER ( ALL ( Table5 ), Table5[Week] <= MAX ( Table5[Week] ) && Table5[Region] = MAX ( Table5[Region] ) ) )
Regards,
Hi, I'm assuming from the lack of response this isn't possible? Or was I unclear in the description?
Thanks,
CM
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |