I am trying do median on the numeric column in the aggregate transform, but i am unable to find median function.
How can I solve Median in azure data flows
I am trying do median on the numeric column in the aggregate transform, but i am unable to find median function.
How can I solve Median in azure data flows
To get median of numeric value, first we have to use collect() function within the aggregate so that we may have an index for each value to locate the center and a count() function to keep track of how many indexes there are present in column.
After that in derived column activity create a median column and defined formula using columns created in aggregate activity.
If length of column is odd
salarycollection[toInteger(round(salarycount+1)/2)]
If length of column is even
(salarycollection[toInteger(round(salarycount+2)/2)]+salarycollection[toInteger(round(salarycount)/2)])/2
My sample data
Output