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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
madji
Helper I
Helper I

How to reference another table?

HI, everyone

I have this script. It is working.

 

 

let

Election.Results = (state) => let

Source = Web.Page(Web.Contents("http://en.wikipedia.org/wiki/"&state)),

Data5 = Source{0}[Data],

ChangedType = Table.TransformColumnTypes(Data5,{ {"Column2", type text}, {"Column3", type text}})

in

ChangedType,

States = Table.FromRows({{"Gomel_Region"}, {"Brest_Region"}, {"Vitebsk_Region"}}, {"State"}),

InsertedCustom = Table.AddColumn(States, "Custom", each Election.Results([State])),

ExpandCustom = Table.ExpandTableColumn(InsertedCustom, "Custom", { "Column2", "Column3"}, {"Column2", "Column3"})

in

ExpandCustom

 

But I want to change this line. I created the table in Excel I would want to give information from Excel How Can I refer to excel table?

 

 

States = Table.FromRows({{"Gomel_Region"}, {"Brest_Region"}, {"Vitebsk_Region"}}, {"State"}),

 

 

Thanks

1 ACCEPTED SOLUTION

2 REPLIES 2
madji
Helper I
Helper I

I try to use this code 

 

 

let

Election.Results = (state) => let

Source = Web.Page(Web.Contents("http://en.wikipedia.org/wiki/"&state)),

Data5 = Source{0}[Data],

ChangedType = Table.TransformColumnTypes(Data5,{ {"Column2", type text}, {"Column3", type text}})

in

ChangedType,

States =Table.FromList( Table.Column(Region,"Region"), Splitter.SplitByNothing(), null, null, ExtraValues.Error),

//States = Table.FromList(States1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
// States = Table.RenameColumns(States2,{{"Column1", "State"}}),

InsertedCustom = Table.AddColumn(States, "TEST", each Election.Results([Column1])),

ExpandCustom = Table.ExpandTableColumn(InsertedCustom, "TEST", { "Column2", "Column3"}, {"Column2", "Column3"})

in

ExpandCustom

 

But I have error

I solved this problem by mean of  this link http://marketing-wiki.ru/wiki/Power_bi_formula_firewall_privacy_settings

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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