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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Simo2024
Frequent Visitor

Filtering and returning average across multiple tables

Hi,

I am new to power BI, and facing some issues.
I have a sumary table with unique IDs and a textual description of the said IDs, and then multiple tables with the same IDs and other values.
the relation ship between the sum table and the rest of the tables is one to many.
I am trying to make a report that filters all the tables and calculate the average, min and max of each unique ID.
Does anybody have any suggestions on how to approach this.

I have tried calculating the average for each table and then using the related function to fetch the values but it doesn't seem to work and my understanding is that the one to many relation is the reason for this!

Thanks!

1 ACCEPTED SOLUTION
v-junyant-msft
Community Support
Community Support

Hi @Simo2024 ,

Please check if this is what you need?
Here are my sample dataests:

vjunyantmsft_0-1704693185846.png

I appended these tables to a new table in Power Query:

vjunyantmsft_1-1704693281643.png

vjunyantmsft_2-1704693293173.png

MAX = MAX('Append1'[Value])
MIN = MIN('Append1'[Value])
AVG = AVERAGE(Append1[Value])

The results are as follows:

vjunyantmsft_3-1704693471495.png

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-junyant-msft
Community Support
Community Support

Hi @Simo2024 ,

Please check if this is what you need?
Here are my sample dataests:

vjunyantmsft_0-1704693185846.png

I appended these tables to a new table in Power Query:

vjunyantmsft_1-1704693281643.png

vjunyantmsft_2-1704693293173.png

MAX = MAX('Append1'[Value])
MIN = MIN('Append1'[Value])
AVG = AVERAGE(Append1[Value])

The results are as follows:

vjunyantmsft_3-1704693471495.png

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,
Thank you, this works.  I have however one worry as I currently have small number of tables and the plan is to keep adding more and more tables, would combining all the tables create some performance issues in the future?
Kind regards

Hi @Simo2024 ,

In my opinion, there is definitely an impact on performance, but since DAX is simpler, I don't think it will be a big impact.
You can try using performance analyser to check the performance of your reports.

vjunyantmsft_0-1704766003616.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

zenisekd
Super User
Super User

Create a table visual in Power BI destkop and insert:
1. ID column from the unique table (Fact table)

2. Other Dimension values, that interest you. e.g. Qty, Sales, etc. When inserted into the visual, by default they are summed (SUM). If you however right-click on the field in the settings, you can select other way of aggregation - Min, Max, Average, and so on...

zenisekd_0-1704472666416.png

 


It is not necessary to create measures.

Hi,
Thank you for your reply, this approach fetches data from one single table at a time and not from across all tables at once!

Could you elaborate?

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors