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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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] )
)
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |