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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Anonymous
Not applicable

Summarization with related tables

Hi together,

 

I have the following data-modell where I turned some n:m relationships into 1:n relationships with a relationship table:

AndreasSc_0-1629284706844.png

The basic idea is, that a person has a numeric effort during a specific timeline.

 

Now I want to summarize all efforts from all persons.

 

I think I need a DAX-function for this, right? (I'm not familiar with DAX, sorry)

 

Which DAX-function do I need to make a summarization within related tables?

 

Thank you in advance!

 

Regards,

 

Andreas

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

Please try this:

avg = CALCULATE(AVERAGE(Effort[Effort_value]), ALLEXCEPT(Person,Person[ID_Person]),ALLEXCEPT('Time','Time'[ID_Time]))

Or change the default summarization type to Average like this:

summarize type.jpg

 

For more details about DAX function reference, please follow the below official document:

Data Analysis Expressions (DAX) Reference - DAX | Microsoft Docs

 

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

Anonymous
Not applicable

Hi @Anonymous ,

unfortunately this messure doesn't work for me. I get some strange numbers.

 

Do you use the Primary Keys from the related tables within the ALLEXCEPT statement, right?

 

Regards,

 

Andreas

Anonymous
Not applicable

Thank you very much for this hint! It works with SUM now.

 

But I have another question regarding this topic:
My values are on a monthly basis.
If a user selects two months for example, the values are just summarized but actually it should calculate the average of both monts.

How do I determine the selected months to be able to do this calculation? Is there a DAX-function for it?

 

Thank you again.

m3tr01d
Continued Contributor
Continued Contributor

Hi,

I think you should let the Effort_Value denormalized in the table Person/Effort table. This way, you will be able to do just a regular SUM of the effort_value column

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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