Forum Discussion
We cannot convert the value "[Table]" to type Table.
Hi,
I donot face any error in Power BI Desktop. but while running same report on server, I face below error. Waiting for support.
We cannot convert the value "[Table]" to type Table.
Here is the M query.
let
Source = Folder.Files("\\IPACK-SVR-FILE\Production\10-Waste\Employee of the Month"),
RemoveOtherColumns = Table.SelectColumns(Source,{"Content", "Name"}),
SplitTextFunction = Splitter.SplitTextByRepeatedLengths(30000),
ListInput = Table.ToRows(RemoveOtherColumns),
ConvertOneFile = (InputRow as list) =>
let
BinaryIn = InputRow{0},
FileName = InputRow{1},
BinaryText = Binary.ToText(BinaryIn, BinaryEncoding.Base64),
SplitUpText = SplitTextFunction(BinaryText),
AddFileName = List.Transform(SplitUpText, each {FileName,_})
in
AddFileName,
ConvertAllFiles = List.Transform(ListInput, each ConvertOneFile(_)),
CombineLists = List.Combine(ConvertAllFiles),
ToTable = #table(type table[Name=text,Pic=text],CombineLists),
AddIndexColumn = Table.AddIndexColumn(ToTable, "Index", 0, 1),
#"Filtered Rows" = Table.SelectRows(AddIndexColumn, each ([Name] <> "Thumbs.db")),
#"Split Column by Delimiter" = Table.SplitColumn(#"Filtered Rows", "Name", Splitter.SplitTextByDelimiter(".", QuoteStyle.Csv), {"Name.1", "Name.2"}),
#"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Name.1", type text}, {"Name.2", type text}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Name.2"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Name.1", "Name"}})
in
#"Renamed Columns"
Dear Ibendlin,
Thank you for your support. I have found the solution for this problem. actually issue was with Privacy setting of the data source. after fix this my problem is resolved. Thank u
7 Replies
- lbendlinSuper User
Are there any empty (zero length) files in that folder? Or files that are being written to while you run your query?
- MIFrequent Visitor
Hi,
No, there is no empty (zero length) files in that folder. attached query converts high resolution Pictures to display in BI. This works perfect in Desktop but gives error on server
- lbendlinSuper User
Does it fail completely in the service or only for certain files? What's the average size of the image files, and how many are there?
- v-henryk-mstfCommunity Support
Hi MI ,
If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.🙂
Best Regards,
Henry