Forum Discussion

Mahesh_22's avatar
Mahesh_22
Copper Contributor
Apr 02, 2025

converting data in column into rows data

I have data in columns and want to convert them into rows as per the screenshot below.

name field is one example; there are multiple other fields like department and entity should also aligned in out put 

  • George_Hepworth's avatar
    George_Hepworth
    Silver Contributor

    You need to create a Crosstab query from your data. There is a Query Design Wizard that will help you do that.

     

    It will look like this.

    TRANSFORM First(OriginalData.[ActualHours]) AS FirstOfActualHours

    SELECT OriginalData.[EmployeeID], OriginalData.[Dept], OriginalData.[Country]

    FROM OriginalData

    GROUP BY OriginalData.[EmployeeID], OriginalData.[Dept], OriginalData.[Country]

    PIVOT Format([DateWorked],"dd mmmm yyyy");

Resources