Forum Discussion
I am getting an empty table from Source after which when I try to expand a column am getting error
- Anonymous4 years ago
Hi NithyaKB ,
This problem seems to be caused by the absence of source table data information, resulting in an error in expand columns due to the Author column not being found. Please update the applied codes in your Advanced Editor as below and check whether it can work:
let Source = lists/getbytitle( list name)/select id, books,author/Title&Expand = "Author", CheckEmpty = if Table.IsEmpty(Source) then #table(type table [Author = [Author = any]], {}) else Source, #"Added Custom" = Table.AddColumn(CheckEmpty, "Title", each "Shakespeare"), #"Expanded Author" = Table.ExpandRecordColumn(#"Added Custom", "Author", {"Title"}, {"Author"}) in #"Expanded Author"If the above one is not working for your scenario, please share some sample data in your source table when there is some data in it. Later we will provide you a suitable solution base on your shared information. Thank you.
Best Regards
Hi NithyaKB ,
This problem seems to be caused by the absence of source table data information, resulting in an error in expand columns due to the Author column not being found. Please update the applied codes in your Advanced Editor as below and check whether it can work:
let
Source = lists/getbytitle( list name)/select id, books,author/Title&Expand = "Author",
CheckEmpty =
if Table.IsEmpty(Source) then
#table(type table [Author = [Author = any]], {})
else
Source,
#"Added Custom" = Table.AddColumn(CheckEmpty, "Title", each "Shakespeare"),
#"Expanded Author" = Table.ExpandRecordColumn(#"Added Custom", "Author", {"Title"}, {"Author"})
in
#"Expanded Author"
If the above one is not working for your scenario, please share some sample data in your source table when there is some data in it. Later we will provide you a suitable solution base on your shared information. Thank you.
Best Regards
- NithyaKB4 years ago
Helper I
HI Anonymous
I need to give 3 columns in expand category .
let
Source = lists/getbytitle( list name)/select id, books,author/Title&Expand = "Author","Books" , "Editors"
CheckEmpty =
if Table.IsEmpty(Source) then
#table(type table [Author = [Author = any]], {})
else
Source,
In this case sould you please tell me how to include 3 expanded columns(Author , Books,Editors) in check empty condition . In current condition it has only 1 expanded column that is Author.