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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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