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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Antonis13
Frequent Visitor

Median & Average measures in report using data through different tables

Hello all,

 

I want to create a calculation for Median & Average values in order to compare different Projects.

In first phase of creating the report I tried the Union Function and the medianx/averagex method applied to 6 different tables-projects but it seems that I cannot combine them correctly.

Here you can see sample data of what I am trying to perform:

Project1

Cost CategoryTotal Cost in EurCost per Unit
Design550005,5
Permitting12000012
Construction8030000,008

 

Project2

Cost CategoryTotal Cost in EurCost per Unit
Design120001,2
Permitting00
Construction3300000,0033

.....

Project6

Cost CategoryTotal Cost in EurCost per Unit
Design660006,6
Permitting32000,32
Construction3100000,0031

 

Can you please help calculate the Average and Median values per row (e.x. Design, Permitting....) ignoring 0 values in each occasion?

Below you will see my current output that I want to add median & average values per cost category (for example A.Engineering/Design Average: xx,x€ Median: xx,xx€) and recalculating each time values change

Antonis13_0-1711118188959.png

Thanks in advance for your suggestions!

 

1 ACCEPTED SOLUTION

7 REPLIES 7
Antonis13
Frequent Visitor

It seems that I am not able to properly apply Union. I should apply Union in a new calculated table or a measure?

That depends. Can your results be impacted by users interacting with the report?

Yes the results can be impacted and should be impacted

Then the UNION has to be an intermediate step in your measure calculation.

Can you please explain in detail how to do it?

 

lbendlin_0-1711457293024.png

 

lbendlin
Super User
Super User

That should work fine. Is your UNION a calculated table or part of a measure?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.