Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Dear Community
I'm created a MEDIAN measure for salesPrice.
As you can see on my screenshot, the blue line is the result I currently get.
But what I like to get is the Median based on the selected date range.
That would be 53.67 in my example, because this is the middle value (median) of this three numbers.
I tried the followning meaure but I don't work as expected.
Test_Medain =
Var Var_LastDate = Max('Time'[DateKey])
Var Var_FirstDate = Min('Time'[DateKey])
Var x =
CALCULATE(
MEDIAN(OrderLine[SalesPriceEUR])
,Filter(
ALL('Time')
,AND('Time'[DateKey] >= Var_FirstDate ,
'Time'[DateKey] <= Var_LastDate
)
)
)
Return (x)
Any plans how I must modify my query?
Thx
Solved! Go to Solution.
Please adjust the measure MyMedian to your needs. File attached.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
21 | |
14 | |
14 | |
13 | |
13 |