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
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
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.

Top Solution Authors