Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
Could someone on the Microsoft side confirm what’s going on in a certain hard to catch error scenario?
For both of the below examples:
Why doesn’t “try Data” catch this error?
My guess as to what’s going on:
Is this anywhere close to correct? 🙂
Thank you,
Ben
let
Data = Table.View(null,[GetType = () => type table [ABC=any], GetRows = () => error "bad"])
in
Data // an error is displayed in Query Editor
// try Data // record's HasError = false but if its field Value is accessed, an error is displayed
// Data is table // returns true
// Table.Schema(Data) // returns schema table
let
Source = Table.FromList({error "bad"}, Splitter.SplitByNothing(), {"Column1"}),
Data = Table.ExpandTableColumn(Source, "Column1", {"abc"})
in
Data // an error is displayed in Query Editor
// try Data // record's HasError = false but if its field Value is accessed, an error is displayed
// Data is table // returns true
// Table.Schema(Data) // returns schema table
Solved! Go to Solution.
Simply referencing the value apparently doesn't raise an error. But enumerating the rows does.
What happens if you do this?
try Table.Buffer(Data)
This should force the enumeration of the rows.
EDIT: Note that there may be other less-expensive ways to initiate enumeration. Buffering is just the first thing that came to mind.
Thanks, @Ehren.
For triggering the enumeration with minimum expense, I'm attracted to "Data{0}?", based on the thought that it has the advantage of only pulling at most one row—just enough to cause the error to be raised.
Simply referencing the value apparently doesn't raise an error. But enumerating the rows does.
What happens if you do this?
try Table.Buffer(Data)
This should force the enumeration of the rows.
EDIT: Note that there may be other less-expensive ways to initiate enumeration. Buffering is just the first thing that came to mind.
Thanks, @Ehren.
For triggering the enumeration with minimum expense, I'm attracted to "Data{0}?", based on the thought that it has the advantage of only pulling at most one row—just enough to cause the error to be raised.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
7 | |
7 | |
6 | |
5 |
User | Count |
---|---|
11 | |
11 | |
9 | |
6 | |
6 |