Datatable Header Positioning

I have extracted this data (servers) from a portal with the headers Host name, CPU Utilization, Memory Utilization, Disk Utilization and manually added the headers Description and TPS but I want the Description to be within the Host name and CPU Utilization. I tired filtering the Host name and adding the Description using the add Data Column to that set and then filter CPU, Memory, Disk Utilization and then adding the TPS manually using add Data Column to that set. I used Merge Data table to merge the two set to the headers in the order Host name, Description, CPU Utilization, Memory Utilization, Disk Utilization, TPS but the values under the headers duplicate itself 11 times instead of just 11 since the data is made of 11 inputs.

How do I get the headers be arranged in the order I want before pasting it onto the PPTx? Please assist.

Dear @Baba_Karim_Abdulai,

To rearrange the columns in DataTable use Filter Data table activity as follows:

Hope this solves your query.
If yes, mark as solution. :slight_smile:

Br,
NikZ

@Baba_Karim_Abdulai

For your both the queries, this expression in assign activity should work.

dtExtractedData = new DataView(dtExtractedData).ToTable(true,new List(Of String)({"Column1", "Column3", "Column2"}).ToArray)

This expression will remove duplicate rows and rearrange the columns as well as you desire.

@Baba_Karim_Abdulai

you can simply try totable

dt = dt.DefaultView.ToTable(false,{"Col1","Col2"})

the column names can be given in order you need

false to get all rows..and true to get only distinct rows

cheers