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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply

Error Code: 104100 - MashupException.Error: Expression.Error: Failed to insert a table

Hi,

 

I have created a function that retrieves the max date in a data source. I would then like to filter another table with that max date as a filter. I works perfectly in Power Query...

 

However, when trying to publish it to a lakehouse I get an error (see below). Can someone explain why it would work in the editor, but not when I try to run/publish the dataflow?

 

AndersASorensen_0-1708801425619.png

 

AndersASorensen_1-1708801462533.png

 

AndersASorensen_2-1708801618668.png

 

Regards,

Anders

1 REPLY 1
StrategicSavvy
Resolver II
Resolver II

Hi, 

 

It seems like Dataflow automatically convert type Record to Table after saving dataflow. You can check and probaly your MaxDate (query) will be saved and MaxDate (table). It causes a problem.

 

I tried same way as you did and refresh failed with same Error code.

 

Maybe somebody can suggest something more efficient but I would suggest solve it this way.

1. Convert your MaxDate to table, make sure Column1 has Date type

2. Sort your Sales table by date ascending

3. Merge your Sales table with MaxDate using LeftJoin type

3. Expand Column1

4. You will see your MaxDate right to date where it shoud start filtering

5. Use Fill down on Column1 - it will propagate same values down to the column

6. Filter out nulls in Column1 and delete column1

 

Now Dataflow completed. Be aware , this is leveraging computed entities in Dataflow so you will need  Premium per User/ Premium capacity. 

If you dont have it you can nest MaxDate inside Sales power query definition. 

 

I am looking forward to seeing more efficient ways!

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: www.linkedin.com/in/lukasz-kozdron 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.