aggregating columns

arkiboys 9,706 Reputation points
2024-03-22T04:51:50.7166667+00:00

Hello,

the ingestion shows several columns as follows:

company product Name actual planned


...

abc pp Arrival Date 1500 null

...

abc pp Despatch Date 1500 null

...

abc pp Arrival Date null 1500

...

abc pp Despatch Date null 1500

Question


How can I display it like this:

company product Name actual planned


abc pp Arrival Date 1500 1500

...

abc pp Despatch Date 1500 1500

please note that I currently use the aggregate transformation as follows but it only shows:

company product Name actual planned


abc pp Arrival Date null 1500

the way I use the aggregate at present is:

group by: company, product
in the aggregates tab I use:

User's image

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

Answer accepted by question author
  1. Smaran Thoomu 32,535 Reputation points Microsoft External Staff Moderator
    2024-03-22T07:43:54.6333333+00:00

    Hi @arkiboys

    Thank you for reaching out to the community forum with your query.

    To display the data in the format you require, you can use the MAX function in the aggregate transformation. Here's how you can modify your current aggregate transformation:

    • Group by: company, product
    • In the aggregates tab, use the following expressions: Name: actual, Function: MAX Name: planned, Function: MAX

    This will display the data in the format you require:

    company  product  Name          actual  planned
    abc      pp       Arrival Date  1500    1500
    abc      pp       Despatch Date 1500    1500
    

    I hope this helps! Let me know if you have any further questions.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.