We received a dataset with data broken out in tranches by category, and would like to put the tranche breaker "Department" into its own column, so the output should be "department", "employee code", "salary" and remove the extra rows at the bottom. Is there anyway to achieve this?

Sample output

In order to create a new column called department and fill the data in the column, you can follow the below steps.
source transformationis taken for input data.derive transformationis taken to add a new column called "Department". The expression for this column is given asiif(isNull(toInteger(EmployeeCode)),EmployeeCode,toString(null())). Another column nameddummyis added and value is given as1.Surrogate Key transformationis added to generate a surrogate key for each row in the data flow.window tansformationis taken to fill the missing values in the "Department" column using thelastfunction.filter transformationis taken to filter out the rows where the "Salary" column is null. and thenselect transformationis taken to select the "EmployeeCode", "Salary", and "Department" columns.Reference: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-script#fill-down