Forum Discussion
ABHIS702
8 years agoFrequent Visitor
Array Formulae in Power BI
Hi,
I'm new to Power BI and need help to add a custom column in my query.
I have a database of employees across companies with 3 columns which looks like below (only first three columns)
I'm trying to add a custom column i.e. Median Age Per Organisation. In excel, I can achieve it using an array formuale-
{=MEDIAN(IF(B2=$B$2:$B$8,$C$2:$C$8,""))}
Please help. Further, if I with to further slice it by say "gender", how can I do that?
Regards
Abhishek Jain
9 Replies
- Zubair_MuhammadCommunity Champion
Try this Column
Column = MEDIANX ( FILTER ( Table1, Table1[Company] = EARLIER ( Table1[Company] ) ), VALUE ( [Age] ) )- Zubair_MuhammadCommunity Champion
Or this one
= CALCULATE ( VALUE ( MEDIAN ( Table1[Age] ) ), ALLEXCEPT ( Table1, Table1[Company] ) )- ABHIS702Frequent Visitor
Sorry, doesn't seem to work. :(