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
dd321
Frequent Visitor

Average value IF no filter is selected in Table

Hi all,

A continuation of my previous post: https://community.powerbi.com/t5/Desktop/Filter-with-multiple-relationship/td-p/700382

I got great support in that thread and I really appreciate it.

 

I'm currently using PowerBI to visualize values in my local database using Direct Query. Example of my entities (simplified, not real entities in my database) but illustrates the relationship between them:Untitled.png

 

  • University has one-to-many relationship with Student
  • Student has one-to-many relationship with GradeValue
  • Grade has one-to-many relationship with GradeValue (it's wrong in the image)

What I currently have:

  • Table 1 of Students (Student.name, Student.age)
  • Table 2 of Grade with (GradeValue.Value, Grade.Description and Grade.Type)

The goal is whenever I select a specific student in table 1, I want to show the student's corresponding gradevalue, grade description and type. That works perfectly! However, when I don't have anything selected, I want to show the average gradevalue.value in table 2 and also change the field name to "average" instead.

 

Is it possible to do that?

 

tl:dr:

Two tables with relationship. If nothing is selected = show average gradevalue.value. If one specific student is selected = show the student's real gradevalue.value (not average).

 

Sincerely,

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

@dd321 ,

 

You may try AVERAGEX.

 

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.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@dd321 ,

 

You may try AVERAGEX.

 

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.

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.