Forum Discussion

easyleesie's avatar
easyleesie
Icon for Helper I rankHelper I
5 years ago
Solved

Create daily average for the month - new table

Hi all

 

I have a table with daily values:

 

1 Jan: 10

3 Jan: 15

4 Jan: 20 

etc

 

I would like to have a new table with 

Jan: average for table above (in this case 15)

 

How do I do this? 

  • easyleesie 

    based on the sample data you provided, you can try this to create a new table.

    Table 2 = 
    VAR tbl=ADDCOLUMNS('Table',"Month",FORMAT('Table'[date],"mmm"))
    return SUMMARIZE(tbl,[Month],"average",AVERAGE('Table'[value]))

6 Replies

  • easyleesie 

    based on the sample data you provided, you can try this to create a new table.

    Table 2 = 
    VAR tbl=ADDCOLUMNS('Table',"Month",FORMAT('Table'[date],"mmm"))
    return SUMMARIZE(tbl,[Month],"average",AVERAGE('Table'[value]))

  • easyleesie , Assume you have date in the table. Have a month year in your table or date table

     

    Month Year = format([date],"YYYYMM")

     

    Try a measure like

    Averagex(Summarize(filter(Table, Month(Table[Date])=1),Table[Month Year], "_1", Sum(Table[Value])),[_1])

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Icon for Administrator rankAdministrator

      I saw your file, thank you very much. However, there may be a need to have control over the results (the Average, Cumulative, etc.), which is not discussed here. I do not omit to point out that your contribution supports. In my case, it doesn't support me.