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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Bebs
Helper II
Helper II

Is there a way to limit the number of lines loaded for a csv

Hi,
I'm working in PowerBI with several big csv files including a 7Go csv File. It works, but for development, is there a command, an option, or something to add in :

= Csv.Document(File.Contents("E:\myfile.csv"),[Delimiter=",", Columns=10, Encoding=65001, QuoteStyle=QuoteStyle.None])
To limit the number of loaded lines (exemple : 10 000).

 

To develop the power Query part, I don't need to load the full data set. And with the full set of data, it takes forever to apply any modifications in Power Query

 

Thanks

1 ACCEPTED SOLUTION
m_dekorte
Super User
Super User

Hi @Bebs,

 

There is no parameter to control the number of rows for Csv.Document BUT  you can use Keep Rows on the Home tab to limit the number of rows by keeping only the top, bottom or a range of rows as first transformation. Once development is done, you can delete that transformation step.

Alternatively, you can utilize R or Python to create a dataframe from the CSV but that is not native to M.


I hope this is helpful

View solution in original post

1 REPLY 1
m_dekorte
Super User
Super User

Hi @Bebs,

 

There is no parameter to control the number of rows for Csv.Document BUT  you can use Keep Rows on the Home tab to limit the number of rows by keeping only the top, bottom or a range of rows as first transformation. Once development is done, you can delete that transformation step.

Alternatively, you can utilize R or Python to create a dataframe from the CSV but that is not native to M.


I hope this is helpful

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors