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

Removed rows not actually removed

Hi there everybody,

 

I'm new to PowerBI but getting the hang of it. However, there's a reasonable amount of peculiarities that make me feel like I'm taking crazy pills. My current problem: I'm importing all CSV files from a specific folder. Each file unfortunately has a useless 1st row that I remove in the query, but still shows up in the data! I've attached a screenshot with the data and data query. Circled in red are the steps that 1) remove the 1st row and 2) set the new top row as headers. The Data view clearly shows those first rows despite them being removed in the query. Am I misunderstanding something or missing a step?

 

powerbi.png

1 ACCEPTED SOLUTION

When you remove top rows and promote headers in the main query, that applies only once for the combined data, not for each individual file.

If you want to perform transformations for each individual file, you should adjust the Transform Sample File query, instead of the main query.

 

Transform Sample query.png

 

The code in the Transform Sample File query, is directly linked to the function that is applied to all files.

 

 

Specializing in Power Query Formula Language (M)

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

I think you should turn on the last steps and click on apply the change. It seems like you finish added your custom steps but you are navigate to the previous history steps.

5.PNG

 

>>The Data view clearly shows those first rows despite them being removed in the query. Am I misunderstanding something or missing a step?

Power query will log operate steps, it not support to modify the original data source. On this basics, you can simply view your previous data of specific steps.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @v-shex-msft,

 

I did turn on those steps and applied the changes, I clicked back through the steps to show for my post what wasn't happening.

When you remove top rows and promote headers in the main query, that applies only once for the combined data, not for each individual file.

If you want to perform transformations for each individual file, you should adjust the Transform Sample File query, instead of the main query.

 

Transform Sample query.png

 

The code in the Transform Sample File query, is directly linked to the function that is applied to all files.

 

 

Specializing in Power Query Formula Language (M)

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.