cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Taking the average of the sum of values per date

Hi Community! I have a table where I would like to sum up the values per individual date (i.e. move from the table on the left to the table in the middle below) and then take the daily average of those values (value on the right below). The "Date", "Segment 1", and "Segment 2" dimensions are filtered so the solution should respond to any filtering required. TO CLARIFY: I would only like the average value at the end, no need for the intermediate table I just included it for the sake of explanation.

 

BP.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Taking the average of the sum of values per date

Try a new measure like

averagex(summarize(Table[Date],"_Sum",sum(Table[Value])),[_Sum])


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

7 REPLIES 7
Highlighted
Super User IV
Super User IV

Re: Taking the average of the sum of values per date

Try a new measure like

averagex(summarize(Table[Date],"_Sum",sum(Table[Value])),[_Sum])


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Taking the average of the sum of values per date

averagex(summarize('Table', [Date],"_Sum",sum(Table[Value])),[_Sum])

Small change as the format wasn't quite correct before I believe. Huge thank you though! 

Highlighted
Helper II
Helper II

Re: Taking the average of the sum of values per date

@amitchandak - It worked beautifully. Is there a way, I can add the grouped value in a new table, so that I can maintain a history of the data. 

Highlighted
Super User IV
Super User IV

Re: Taking the average of the sum of values per date

Summarize can be used to create a new table



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper IV
Helper IV

Re: Taking the average of the sum of values per date

Hi @amitchandak thank you again hugely for your help. I have one more question related to this. What if I wanted the average to be calculated on only a specific category (e.g. where Segment 2 = "A" or "B"). Where would this filter statement go for the rest of the summarize to work?

Highlighted
Super User IV
Super User IV

Re: Taking the average of the sum of values per date

@spenot09 , one of the way

averagex(summarize(filter(Table, Table[Segment 2] in {"A","B"}), Table[Date],"_Sum",sum(Table[Value])),[_Sum])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper IV
Helper IV

Re: Taking the average of the sum of values per date

FANTASTIC as well always @amitchandak , thank you!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Top Solution Authors
Top Kudoed Authors