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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.