cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chrisvdwal Frequent Visitor
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
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
Anonymous
Not applicable

Re: Average per day

hii @chrisvdwal

 

 Try this ..

 

 

Average =
CALCULATE (
AVERAGE(Table1[value] ),
FILTER ( ALLSELECTED ( Table1 ), Table1[date ]=EARLIER(Table1[date ]
)))
Highlighted
chrisvdwal Frequent Visitor
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

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

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

Top Ideas
Users Online
Currently online: 6 members 890 guests
Please welcome our newest community members: