cancel
Showing results for
Did you mean:
Frequent Visitor

## Average per day

Hi, seems too simple but I can't work this out....

I'd like to create a column with DAX that is the average of a column per day.

Sample data

date          value

1/1/2019   1

1/1/2019   2

1/1/2019   1

1/2/2019   1

1/2/2019   1

1/3/2019   10

1/3/2019   1

1/3/2019   1

so the new column would be average per day,

date          value  average

1/1/2019   1        1.33

1/1/2019   2        1.33

1/1/2019   1        1.33

1/2/2019   1        1

1/2/2019   1        1

1/3/2019   10      4

1/3/2019   1        4

1/3/2019   1        4

There is a bunch of calculation I'll do on the average, hence needing a column.

Thanks for any help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

## Re: Average per day

hii @chrisvdwal

Try this ..

Average =
CALCULATE (
AVERAGE(Table1[value] ),
FILTER ( ALLSELECTED ( Table1 ), Table1[date ]=EARLIER(Table1[date ]
)))
2 REPLIES 2
Highlighted
Anonymous
Not applicable

## Re: Average per day

hii @chrisvdwal

Try this ..

Average =
CALCULATE (
AVERAGE(Table1[value] ),
FILTER ( ALLSELECTED ( Table1 ), Table1[date ]=EARLIER(Table1[date ]
)))
Frequent Visitor

## Re: Average per day

Thanks @Anonymous, appreciate the help

I thought I had tried that, but another crack at it and it worked.

Thanks again

Announcements

#### Back to School Contest

Engage and empower students with Power BI!

#### Watch Sessions On Demand!

Continue your learning in our online communities.

#### Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

#### PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Top Kudoed Authors
Users Online
Currently online: 26 members 996 guests
Recent signins: