Median aggregation in SSIS

Yohandy 1 Reputation point
2020-09-17T07:58:22.32+00:00

Hi,

I have a table of that have 3 columns, column A, column B and column C. Column B can have multiple records of column A. What I need to do is to add another column that contains the median value of column C based on column B. The thing is, the Aggregate Function in SSIS doesn't include Median. Is it possible to do it in SSIS, and if not, what is the solution of the problem?

Thank you in advance,
Sincerely,
Yohandy

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,486 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalv-MSFT 5,896 Reputation points
    2020-09-17T08:51:15.733+00:00

    Hi @Yohandy ,

    Please add new column and use "(ColumnB+ColumnC)/2" expression in the Derived Column Transformation.
    25571-derivedcolumntransformation.png

    Best Regards,
    Mona


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.