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
SebKaliVith
Regular Visitor

Average conditioned

Hello everyone,

 

I come back here because i got great answers last time i ask my questions here.

 

I would like to solve the problematic following :

 

I have two data tables in PBI. They are linked to each other with two columns key.

This is like :

 

 

Table 1
IDHospital
Key1A
Key2B
Key3C
Key4D

 

 

TABLE 2
IDPhaseTake into accountprogress
Clé 1P1120%
Clé 1P2110%
Clé2P1180%
Clé2P1110%
Clé2P2015%
Clé3P1160%
Clé4P1170%

 

I would like to :

For each hospital, find the average of the progress by phases, with only activites flagged by 1 (activites to take into account).

Imo, it's an average of the progresse on the Table 1, conditioned by phases and by the column "Take into account". But, i am a beginner in DAX, and i don't knwo how to do it !

 

Results should be :

 

 

RESULTS
HospitalPhasesProgress
AP120%
AP210%
BP145%
BP2-
CP160%
CP2-
DP170%
DP2-

 

Can Someone give me clue to find these progress average ?

 

 

Thank you for your help ! 

 

Séb

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Did something go haywire in the posting? Is the ID in Table 2 supposed to match the ID in Table 1? Key1, Key2...? 



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...

Assuming the answer is yes, perhaps:

 

AverageProgress = 
VAR __tmpTable = FILTER('Progress',[Take into account]=1)
RETURN AVERAGEX(__tmpTable,[progress])

Put into a table along with Hospital and Phase. Make sure Hospital and Phase are related based on [ID] columns.

 

 



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...

Helpful resources

Announcements
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.