Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a dataset below.
I need to calculated median per year and have category as a slicer (If slicer is selected, median to be changed per slicer otherwise median per year).
For eg. When I use allexcept, the median remains static does not change with the slicer settings, I want static median value per year that changes dynamically with slicer.
Category | Year | Time in Days |
A | 2018 | 125 |
B | 2018 | 129 |
C | 2019 | 147 |
A | 2019 | 234 |
B | 2018 | 367 |
C | 2019 | 456 |
A | 2019 | 55 |
B | 2018 | 98 |
C | 2018 | 84 |
Solved! Go to Solution.
Hi @bharosha
please try
MedianMeasure =
CALCULATE (
MEDIAN ( 'Table'[Time in Days] ),
ALLSELECTED (),
VALUES ( 'Table'[Year] )
)
Hi @bharosha
please try
MedianMeasure =
CALCULATE (
MEDIAN ( 'Table'[Time in Days] ),
ALLSELECTED (),
VALUES ( 'Table'[Year] )
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
8 | |
6 | |
5 |
User | Count |
---|---|
17 | |
14 | |
10 | |
9 | |
8 |