Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CloudMonkey
Post Prodigy
Post Prodigy

Presenting average-to-date in table

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.

 

 

sceenshot pricing.JPG

 

Thanks,

 

CM

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@CloudMonkey

 

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] )
    )
)

4.PNG

 

Regards,

 

 

View solution in original post

2 REPLIES 2
v-sihou-msft
Employee
Employee

@CloudMonkey

 

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] )
    )
)

4.PNG

 

Regards,

 

 

CloudMonkey
Post Prodigy
Post Prodigy

Hi, I'm assuming from the lack of response this isn't possible? Or was I unclear in the description?

 

Thanks,

 

CM

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.