cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Excel Power Query into Power Bi

Hello,

Can anyone suggest me,How to run below excel power query in to Power Bi?

I have used advance editor in power bi but getting continuous error.

"Expression Error:The column 'indicator' of the table wasn't found.

Details:Indicator

 

let
    Source = Excel.Workbook(File.Contents("C:\Users\abc\Desktop\Table.xlsx"), null, true),
    Table_Sheet = Source{[Item="Table",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Table_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Receipt No", type number}, {"Indicator", type text}, {"Count", Int64.Type}, {"Rate", Int64.Type}, {"Region ID", Int64.Type}}),
 key = Table.AddColumn(Source, "key", each Text.BeforeDelimiter(Text.From([Receipt No], "ru-RU"), "."), type text),
    transform = Table.TransformColumns(key, {"Indicator", each Record.FieldOrDefault([N = -1, Y = 1], _, _)}),
    group = Table.Group(transform, {"key"}, {"a", each List.Sum(List.Combine({[Indicator],[Count],[Rate],[#"Region ID"]})), type number}),
    list = Table.SelectRows(group, each [a] = 0)[key],
    filter = Table.SelectRows(key, each not List.Contains(list, [key])),
    final = Table.RemoveColumns(filter,{"key"})
in
    final

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Excel Power Query into Power Bi

Hi @PoweBI,

Could you please check the [Indicator] column in your excel file, if there is no column called "Indicator", it may occur your problem, or you could upload your excel file to have a test if possible.


 

let
    Source = Excel.Workbook(File.Contents("C:\Users\abc\Desktop\Table.xlsx"), null, true),
    Table_Sheet = Source{[Item="Table",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Table_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Receipt No", type number}, {"Indicator", type text}, {"Count", Int64.Type}, {"Rate", Int64.Type}, {"Region ID", Int64.Type}}),
 key = Table.AddColumn(Source, "key", each Text.BeforeDelimiter(Text.From([Receipt No], "ru-RU"), "."), type text),
    transform = Table.TransformColumns(key, {"Indicator", each Record.FieldOrDefault([N = -1, Y = 1], _, _)}),
    group = Table.Group(transform, {"key"}, {"a", each List.Sum(List.Combine({[Indicator],[Count],[Rate],[#"Region ID"]})), type number}),
    list = Table.SelectRows(group, each [a] = 0)[key],
    filter = Table.SelectRows(key, each not List.Contains(list, [key])),
    final = Table.RemoveColumns(filter,{"key"})
in
    final

 




Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Super User V
Super User V

Re: Excel Power Query into Power Bi

Hi @PoweBI,

 

This is refering to your column Indicator, on the query editor try going step by step and checking where it breaks, then check what happen between the two steps.

 

Without having the data appears that the column Indicator does not exist on your table, but again don't have aniway to confirm.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog:

Power BI em Português





Highlighted
Microsoft
Microsoft

Re: Excel Power Query into Power Bi

Hi @PoweBI,

Could you please check the [Indicator] column in your excel file, if there is no column called "Indicator", it may occur your problem, or you could upload your excel file to have a test if possible.


 

let
    Source = Excel.Workbook(File.Contents("C:\Users\abc\Desktop\Table.xlsx"), null, true),
    Table_Sheet = Source{[Item="Table",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Table_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Receipt No", type number}, {"Indicator", type text}, {"Count", Int64.Type}, {"Rate", Int64.Type}, {"Region ID", Int64.Type}}),
 key = Table.AddColumn(Source, "key", each Text.BeforeDelimiter(Text.From([Receipt No], "ru-RU"), "."), type text),
    transform = Table.TransformColumns(key, {"Indicator", each Record.FieldOrDefault([N = -1, Y = 1], _, _)}),
    group = Table.Group(transform, {"key"}, {"a", each List.Sum(List.Combine({[Indicator],[Count],[Rate],[#"Region ID"]})), type number}),
    list = Table.SelectRows(group, each [a] = 0)[key],
    filter = Table.SelectRows(key, each not List.Contains(list, [key])),
    final = Table.RemoveColumns(filter,{"key"})
in
    final

 




Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper V
Helper V

Re: Excel Power Query into Power Bi

Thank you so much Daniel.Smiley Happy

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors