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

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

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.

Top Ideas
Users Online
Currently online: 33 members 915 guests
Please welcome our newest community members: