Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
Excel Median function accepts more than one column as parameter, But when I tried Median function in Power BI it allows only single parameter/ single column.
I want to use a Median function with below columns
= Median ( [Corrected Aging Date],[End hours],[start hours]) this formula is possible in Excel but same not working in Power BI.
All columns which I am using in the above formula are within the same table only.
Thanks and Regards
Ravi Jain
Hi @Anonymous,
If the three columns are date/time or time, then what the expect result should be returned by Median function? Could you show some examples in Excel?
Regards,
Yuliana Gu
@Anonymous
If you change the DataType of Calculated Column to DateTime.....I think you will get the desired result
But as Yuliana @v-yulgu-msft pointed out....please share few rows of data with expected results
Hi @Zubair_Muhammad and @v-yulgu-msft
I have tried with changing data type , but still it will not coming for me. Now no issues i have changed the way of calcuation for formula we needed as expected out come. As there is not any point to calculated median with 2 different datatypes. Thanks both fo you.
@Anonymous
You can use this calculated column
Calculated Column = MEDIANX ( { [Corrected Aging Date], [End Hours], [Start Hours] }, VALUE ( [Value] ) )
Hi @Zubair_Muhammad,
Thanks for quick reply but my first column [Corrected Aging Date] is date type, how it will work when we have one column as Date type and other 2 are whole number type please guide me.
Hi @Zubair_Muhammad,
Sorry, I have missed the few things while post this, your example is right for when we are having a same data type columns.but in my Case columns I am using are below type,
[Corrected Aging Date]: Date time - Datatype
[End hours ]: Time: Datatype
[Start hours]: Time: Datatype.
You have provided an example above how it will work with MedianX with this datatype? Guide me.
@Anonymous
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |