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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Paulyeo11
Impactful Individual
Impactful Individual

Can I add script to power quarry to load X row data only ?

Hi All

i like to know am I allow to write some script insert into M CODE section to limit load only 9 row of data to PBI. 

So I can use that for testing purpose.

Paul

2 ACCEPTED SOLUTIONS
Adamtall
Resolver III
Resolver III

Hi,

 

you can use "keep top rows" 

 

type this code in a blank query "advanced editor"

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcs7PLchJLUlV0iGPGauDYgYxetH1kG0vmrHotuN3G43chMPLcITpbkxlWP1G47DE5yCiwxSPG1ECAdnuWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Brand Completeness" = _t, #"SC Franchise Completeness" = _t, #"Commercial Franchise Completeness" = _t, #"Varient Completeness" = _t, #"ShelfLife Completeness" = _t, #"Medically Critical completeness" = _t]),
#"Kept First Rows" = Table.FirstN(Source,9)
in
#"Kept First Rows"

 

/Adam

View solution in original post

Hi, 

 

Depends if it is a Database? 

 

 

then you can have a sql query:

like this:

---------------

select top 70
[$Table].[timestamp] as [timestamp],
[$Table].[Exclude from Accrual Report] as [Exclude from Accrual Report]
from [dbo].[EQM$G_L Entry] as [$Table]

------------------

 

or: 

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcs7PLchJLUlV0iGPGauDYgYxetH1kG0vmrHotuN3G43chMPLcITpbkxlWP1G47DE5yCiwxSPG1ECAdnuWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Brand Completeness" = _t, #"SC Franchise Completeness" = _t, #"Commercial Franchise Completeness" = _t, #"Varient Completeness" = _t, #"ShelfLife Completeness" = _t, #"Medically Critical completeness" = _t]),
#"Kept First Rows" = Table.FirstN(Source,70)
in
#"Kept First Rows"

 

/Adam

View solution in original post

4 REPLIES 4
Adamtall
Resolver III
Resolver III

Hi,

 

you can use "keep top rows" 

 

type this code in a blank query "advanced editor"

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcs7PLchJLUlV0iGPGauDYgYxetH1kG0vmrHotuN3G43chMPLcITpbkxlWP1G47DE5yCiwxSPG1ECAdnuWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Brand Completeness" = _t, #"SC Franchise Completeness" = _t, #"Commercial Franchise Completeness" = _t, #"Varient Completeness" = _t, #"ShelfLife Completeness" = _t, #"Medically Critical completeness" = _t]),
#"Kept First Rows" = Table.FirstN(Source,9)
in
#"Kept First Rows"

 

/Adam

Paulyeo11
Impactful Individual
Impactful Individual

Hi Sir

 

how to ask PBI only load 70 row ?

Hi, 

 

Depends if it is a Database? 

 

 

then you can have a sql query:

like this:

---------------

select top 70
[$Table].[timestamp] as [timestamp],
[$Table].[Exclude from Accrual Report] as [Exclude from Accrual Report]
from [dbo].[EQM$G_L Entry] as [$Table]

------------------

 

or: 

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcs7PLchJLUlV0iGPGauDYgYxetH1kG0vmrHotuN3G43chMPLcITpbkxlWP1G47DE5yCiwxSPG1ECAdnuWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Brand Completeness" = _t, #"SC Franchise Completeness" = _t, #"Commercial Franchise Completeness" = _t, #"Varient Completeness" = _t, #"ShelfLife Completeness" = _t, #"Medically Critical completeness" = _t]),
#"Kept First Rows" = Table.FirstN(Source,70)
in
#"Kept First Rows"

 

/Adam

Paulyeo11
Impactful Individual
Impactful Individual

Hi Sir

thank you for your sharing .

i am load by CSV or TXT format 

 

paul

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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