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
Anonymous
Not applicable

Median Value of a Table with Distinct Values

Spoiler
Hello Guys, 
I have the following Problem: 
I have a Production Data Sample for Process Mining. This shows the different Cases (1 Case = 1 Product) and the corresponding Processes behind it. So Case 1 for example has 10 underlying Processes --> so the table looks like the following: 

Production Sample 1.PNG

 

Production Sample 2.PNG

As you can see I filtered only for Case 1 but this repeats itself for every case (some even havy the same Process 10x or so). 

I already calculated the Duration by Case ID so every Process added up and now I want the Median of every Duration by Case ID .

 

It would be a huge help because I am new to Power BI and dont know how to master this.

 

Kind Regards 

1 REPLY 1
Anonymous
Not applicable

 

[Median Duration] :=
var __caseId = Table[case]
RETURN
	MEDIANX(
		FILTER(
			Table[Duration],
			Table[case] = __casedId 
		),
		Table[Duration]
	)

This is not a measure. It's a calculated column. Table is the name of the second table where 'case' sits.

 

Best

Darek

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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