Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi - trying to calculate medians for one category of data in a single location & in all location (why can't I include a pbix here?). Screenshot not super helpful probably. my data has 4 columns & I've created one measure to get FleetMedian:
Solved! Go to Solution.
I modified your measure [FltMdnDuration] with regard to the last argument. Instead of using FILTER for the entire table, it now filters only [duration].
FltMdnDuration =
CALCULATE (
MEDIAN ( dummydata[duration] ),
ALL ( dummydata[sitekey] ),
dummydata[duration] > 0
)
It's best practice to use explicit measures, so I changed Median of Duration to a measure instead of using Median in the field dropdown.
Median of Duration = MEDIAN ( dummydata[duration] )
When I put these two measures into a visual with interactions enabled for both slicers, I get this:
Is this correct?
Proud to be a Super User!
I modified your measure [FltMdnDuration] with regard to the last argument. Instead of using FILTER for the entire table, it now filters only [duration].
FltMdnDuration =
CALCULATE (
MEDIAN ( dummydata[duration] ),
ALL ( dummydata[sitekey] ),
dummydata[duration] > 0
)
It's best practice to use explicit measures, so I changed Median of Duration to a measure instead of using Median in the field dropdown.
Median of Duration = MEDIAN ( dummydata[duration] )
When I put these two measures into a visual with interactions enabled for both slicers, I get this:
Is this correct?
Proud to be a Super User!
Just tested...Yes! Both fields are coming out with the desired median values. Thank you so much!
Jeff
You can disable interactions between visuals in Format --> Edit interactions:
You can share a pbix link (OneDrive, etc.).
Proud to be a Super User!
Thanks! I just added a link to an example pbix; hope my work onenote allows access.
The pbix (and screenshot of it) use cards to display the 2 different median measurements...but really both numbers will be used in one visual (probably a bullet chart). With both measures in one visual, I can't break the link with the filters.
I wasn't able to access the pbix ("<email address> can't be found in the mybpl-my.sharepoint.com directory").
Proud to be a Super User!
maybe my google drive will work (if you still have time to look at it):
https://drive.google.com/file/d/19ETvTvOkCLqPaJqYgF5pqQIQL0RTApoB/view?usp=sharing
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 192 | |
| 125 | |
| 99 | |
| 67 | |
| 48 |