Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Creating an average per week table

Hi All,

 

I have a data set that looks something like this:

DateResult
16/11/20205
18/11/20207
18/11/20202
19/11/20208
22/11/20201
24/11/20209
27/11/20204
28/11/20203

 

I would like to generate a new table so that one column is the week start date (Monday) and the other is the average result of that particular week (Mon-Sun).

So if you were to take the above as an example, I should have something like this:

Week Start DateAverage Result of Week
16/11/20204.6
23/11/20205.3

 

Any help would be fully appreciated. Thanks.

  • Anonymous ,Create a new column like

    Week Start date = 'Table'[Date]+-1*WEEKDAY('Table'[Date],2)+1

     

    Now you can use thismeasure in the visual

    measure = Average('Table'[Result])

     

    or create a table like

    new table = summarize('Table','Table'[Week Start date] ,"Avg", Average('Table'[Result]))

1 Reply

  • Anonymous ,Create a new column like

    Week Start date = 'Table'[Date]+-1*WEEKDAY('Table'[Date],2)+1

     

    Now you can use thismeasure in the visual

    measure = Average('Table'[Result])

     

    or create a table like

    new table = summarize('Table','Table'[Week Start date] ,"Avg", Average('Table'[Result]))