Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Tranform CSV/Excel header value into a new column

Hi,

I have a source file coming as below with first 3 rows having the report details of topic, start time and other details.
Want to transform the topic from the row level and populate it as a column in dataset along with all the existing columns.(

the actual column headers are in row 6.)

I need the below marked which is Topic, start time and Report generated as new columns added and then remove  rows 1-5 after the tranformation.

 

Deepthi521_0-1639387147939.png

 

we need the below marked which is Topic, start time and Report generated as column added and populated.

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous ,

 

For this you need to add 3 new columns and they must have the following syntax:

ReportGenerated Column

if [Column1] = "Report Generated:" then [Column2] else null

Topic Column 
if [Column1] = "Topic" then [Column3] else null

Vault Hour column
if [Column1] = "Vaul Hour" then [Column3] else null

 

Next step is toNow just select each column right click and select fill down on each of the values and you will get a full column with the values you need then just delete the other rows and put the headers has needed.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.