Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
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
Solved! Go to Solution.
I solved this problem by mean of this link http://marketing-wiki.ru/wiki/Power_bi_formula_firewall_privacy_settings
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
| User | Count |
|---|---|
| 77 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |