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.
I need the median value of a column (whose value is derived from a measure). In every attempt, it is only returning the median of rows that have a value greater than zero.
I have two tables, one is an "employee" table and one an "attendee" table. I have a measure that counts each time an employee is in the attendee table:
Solved! Go to Solution.
Hi,
Please try this measure:
MED Col A = MEDIANX(SUMMARIZE(Employee_M,Employee_M[Employee ID],"EE",[EE Attend]),[EE])
The result shows:
See my attached pbix file.
Best Regards,
Giotto
Hi All,
Thank you for your replies. My numbers are not coming from a static table (as in @Greg_Deckler's .pbix), they are being generated by a counting measure. I would love to post a .pbix file to show this, but it does not look like I can. I have no option to add an attachment to my posts/replies.
Edit: Here are some screen shots that I hope will help explain this further (note that these numbers will be different from my original post).
Here are the two tables:
Here is the relationship:
The visual is a table, with two columns, the first being Employee_M[Employee ID], and the second being this measure:
I should mention that the reason why I am not using a calculated column is that I need to be able to filter by dates.
@J2K Most people use OneDrive or Box or some other file sharing service to share PBIX files.
@Greg_Deckler Here you go:
https://www.dropbox.com/sh/e9nhfa9ct8lvgdt/AABA4QgxXplpOARmOqiK4qlpa?dl=0&preview=MedianDemo.pbix
Again, I appreciate you taking the time to look at these things.
@Greg_Deckler Here you go:
https://www.dropbox.com/sh/e9nhfa9ct8lvgdt/AABA4QgxXplpOARmOqiK4qlpa?dl=0&preview=MedianDemo.pbix
Again, I appreciate that you take the time to look at these things.
Hi Giotto,
Thank you very much. This works perfectly.
Well, all I can say from the information provided is that you are doing something wrong in your calculation. Because MEDIAN and MEDIANX work for your data. See attached PBIX.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
98 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |