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

Top Solution Authors