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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
blackanese27
Frequent Visitor

Expression. Error The field 'Content' of the record wasn't found.

Hello. First time poster here. I'm new to PowerBI but not to Data Manipulation. I've browsed around the board but haven't found a solution yet. I recently transitioned into a career in Data Analytics. I'm one of two Data Analysts and am currently fixing the previous Analysts Queries & Connections for a board presentation that I have at the end of the month. 

 

I've been working over the past week on fixing queries and connections for work that I received from the previous analyst. They didn't do a good job of labeling their items unfortunately which has been tough to figure out.The field 'Content" is only present in the 1st step and afterwards it's no longer present in the data. 

 

Here's the first chunk of code, wasn't sure if it was necessary for me to share the rest. 

 

Screenshot for PowerBI 4.png

 

This is the column that's being referenced. The creator of the Query appended CSV folders together.screenshot for reddit 2.png

 

Screenshot for Reddit 3.png

 

Screenshot for Reddit Expression Error.png

 

Thanks!

1 ACCEPTED SOLUTION

Hi @blackanese27 ,
it would work like so:

Source = Folder.Files("K:\Admin\Business Analyst\A-Analyst Secured\Projects\2021 Property Equity Analysis\Data\Original\Cascade\Resident Demographics"),
#"Filtered Hidden Files2" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function2" = Table.AddColumn(#"Filtered Hidden Files2", "Transform File (4)", each TransformSteps([Content])),
#"Removed Other Columns2" = Table.SelectColumns(#"Invoke Custom Function2", {"Name", "Transform File (4)", "Content"}),

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

8 REPLIES 8
ImkeF
Super User
Super User

Hello  @ecalzavara ,
no, dataflows cannot store binary columns, nor records, lists or tables.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

ImkeF
Super User
Super User

Hi @blackanese27 ,

I you paste your m-code here as text instead of an image, I can exactly show you where to put that.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

I pasted the first 4 lines of code just in case. I appreciate your help!

 

Source = Folder.Files("K:\Admin\Business Analyst\A-Analyst Secured\Projects\2021 Property Equity Analysis\Data\Original\Cascade\Resident Demographics"),
#"Filtered Hidden Files2" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function2" = Table.AddColumn(#"Filtered Hidden Files2", "Transform File (4)", each TransformSteps([Content])),
#"Removed Other Columns2" = Table.SelectColumns(#"Invoke Custom Function2", {"Name", "Transform File (4)"}),

 

 

Hi @blackanese27 ,
it would work like so:

Source = Folder.Files("K:\Admin\Business Analyst\A-Analyst Secured\Projects\2021 Property Equity Analysis\Data\Original\Cascade\Resident Demographics"),
#"Filtered Hidden Files2" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function2" = Table.AddColumn(#"Filtered Hidden Files2", "Transform File (4)", each TransformSteps([Content])),
#"Removed Other Columns2" = Table.SelectColumns(#"Invoke Custom Function2", {"Name", "Transform File (4)", "Content"}),

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

*Excuse my language but holy **bleep** it worked! Thanks so much for your help. 

It's another Query that's supposed to be pulling data from the Query you helped me with combined with one that I fixed myself and it's taking forever to load. I created a separate document and saved the edits that you suggested. What's the longest that you've seen documents to load? Any tips? The files that are being used are CSV's but it's still taking a long time to load. 

 

Thanks again for your help!

ImkeF
Super User
Super User

Hi @blackanese27 ,
yes, in the 4th steps ("Removed Columns2") that field will be removed and can therefore not be referenced later.
Just add its column name to the list of names in the 2nd function argument and you have it in again for later reference.
However, it could of course be that there is a different error in your query and the step that is now lacking the content field should actually reference a different table (where this column is still contained). How knows, if a query is broken like that... You will have to try it out.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

@ImkeF , do you know if this works in DataFlow as well? I have been trying to use reference (computed) tables in DF for a while but this error always prevents me to be able to use one query to source the folder, and the referenced folders to expand the content of the container files, as the column "Content"with the [Binary] data type gets always wiped by the dataflow when closing and applying.

Any solution for this?

 

Thanks!

Thanks for the response lmkeF. Where in particular would I add the 'Content' field in the second argument? Would it be with [Attributes]? [Hidden]?  When I tried that, I got another Expression Error

 

Expression.Error: We cannot convert a value of type Binary to type List.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors