Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ermuelle
Regular Visitor

Calculating average over multiple tables

I am trying to calculate a total monthly average from data in two seperate tables. This seems like it should be easy, but I cannot figure out the proper DAX formula. Please help! Here's what the data looks like. How do I connect these 2 tables so that I can calculate the overall monthly average of both managed and referred satisfaction? Basically I want a line chart that has the average managed satisfaction, the average referred satisfaction and then the total satisfaction by month. Thank you in advance.

 

Table 1 - Managed Satisfaction

Date                             Score

July 1, 2017                  3

July 2, 2017                  4

August 28, 2017          2

 

Table 1 - Referred Satisfaction

Date                            Score

July 14, 2017               5 

August 3, 2017            1

1 ACCEPTED SOLUTION

Hi,

 

You must create a calendar table and create a relationship from the Date column of the appended table to the date column of the Calendar Table.  In the Calendar Table use the =FORMAT(Calendar[Date],"mmmm") formula to extract the month name from the Date and =YEAR(Calendar[Date]) to extract the Year.  In your visual, drag the Year and Month from the Calendar Table.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

 

In each table, create another column titled Type of satisfaction.  Using Query Editor, append both Tables and then create your desired visual with this simple measure

 

=SUM(Data[Score])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

I would probably use something like:

 

AVERAGEX(UNION(Table1,Table2),[Score])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Just what I was looking for.

thanks

Thanks. I've tried this, but I only get the overall average across the time period. I can't look at it by month. I want to be able to look at the total average (referred + managed satisfaction) by month.

Hi,

 

You must create a calendar table and create a relationship from the Date column of the appended table to the date column of the Calendar Table.  In the Calendar Table use the =FORMAT(Calendar[Date],"mmmm") formula to extract the month name from the Date and =YEAR(Calendar[Date]) to extract the Year.  In your visual, drag the Year and Month from the Calendar Table.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you! I think I found a solution.

Hi!

I know it's been ages since this post. But would you happen to have the pbix file? I have almost the exact same question

@ermuelle,

 

By the way, you may help accept solution. Your contribution is highly appreciated.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.