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
pkoel-asb
Helper V
Helper V

New User: Expression service limit has been reached - HELP

Hello,

 

   I am trying to update a Power BI desktop report. I was working fine. Now when I try to refresh, I get the following error for one of my tables:

 

DataSource.Error: Microsoft SQL: Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.
Details:
DataSourceKind=SQL
DataSourcePath=asb-cdw-sql01;ACESREPORTING
Message=Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.
ErrorCode=-2146232060
Number=8632
Class=17

 

I have gone back three versions and I still get the same error on the same table. The advanced editor view of my table is below:

 

let
Source = Sql.Databases("asb-cdw-sql01"),
ACESREPORTING = Source{[Name="ACESREPORTING"]}[Data],
Vendor_Dashboard = ACESREPORTING{[Schema="Vendor",Item="Dashboard"]}[Data],
#"Renamed Columns" = Table.RenameColumns(Vendor_Dashboard,{{"Sum_Amount", "Sales"}, {"VendorID", "Vendor"}, {"Name1", "Vendor Name"}, {"ProductType", "Vendor Type"}, {"Sales_Month", "MONTH"}, {"Sales_Year", "YEAR"}, {"DeptID", "OMBU"}, {"Vendor_Class", "Vendor Clasification"}, {"Sales_FullName", "Rep Name"}}),
#"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns",{"Sales", "Product", "Vendor", "Vendor Name", "Vendor Type", "MONTH", "YEAR", "OMBU", "Vendor Clasification", "Rep Name", "ID", "LastUpdated"}),
#"Replaced Value" = Table.ReplaceValue(#"Reordered Columns","E","Employee",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","R","OUTSIDE PARTY",Replacer.ReplaceText,{"Vendor Clasification"}),
#"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1","P","PFP-PATRIOT",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value3" = Table.ReplaceValue(#"Replaced Value2","B","PFP-BLUE",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value4" = Table.ReplaceValue(#"Replaced Value3","G","PFP-GRAY",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value5" = Table.ReplaceValue(#"Replaced Value4","W","PFP-WHITE",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value6" = Table.ReplaceValue(#"Replaced Value5","C","ASB CORPORATE VENDOR",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value7" = Table.ReplaceValue(#"Replaced Value6","N","NON-MEMBER",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value8" = Table.ReplaceValue(#"Replaced Value7","X","DO NOT USE",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value9" = Table.ReplaceValue(#"Replaced Value8","D","PFP-RED",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Replaced Value10" = Table.ReplaceValue(#"Replaced Value9","Y","NEW VENDOR",Replacer.ReplaceValue,{"Vendor Clasification"}),
#"Removed Duplicates" = Table.Distinct(#"Replaced Value10", {"Vendor Clasification"}),
#"Removed Other Columns" = Table.SelectColumns(#"Removed Duplicates",{"Vendor Clasification"})
in
#"Removed Other Columns"

 

I do not understand why I am getting this now, when it used to work. I also do not understand why it is failing for three versions back? Have I reached some sort of limit?

 

Cheers,

 

Peter

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @pkoel-asb 

 

It’s my pleasure to answer for you.

According to your description,I think you can try to simplify your query.

Like this:

try the following formula:
let
Source = Sql.Databases("asb-cdw-sql01"),
ACESREPORTING = Source{[Name="ACESREPORTING"]}[Data],
Vendor_Dashboard = ACESREPORTING{[Schema="Vendor",Item="Dashboard"]}[Data],
#"Renamed Columns" = Table.RenameColumns(Vendor_Dashboard,{{"Sum_Amount", "Sales"}, {"VendorID", "Vendor"}, {"Name1", "Vendor Name"}, {"ProductType", "Vendor Type"}, {"Sales_Month", "MONTH"}, {"Sales_Year", "YEAR"}, {"DeptID", "OMBU"}, {"Vendor_Class", "Vendor Clasification"}, {"Sales_FullName", "Rep Name"}}),
#"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns",{"Sales", "Product", "Vendor", "Vendor Name", "Vendor Type", "MONTH", "YEAR", "OMBU", "Vendor Clasification", "Rep Name", "ID", "LastUpdated"}),
#"Replaced Value" = Table.TransformColumns(#"Reordered Columns",{"Vendor Clasification",each
if _="E"
then "Employee"
else if _="R"
then "OUTSIDE PARTY"
else if _="P"
then "PFP-PATRIOT"
else if _="B"
then "PFP-BLUE"
else if _="G"
then "PFP-GRAY"
else if _="W"
then "PFP-WHITE"
else if _="C"
then "ASB CORPORATE VENDOR"
else if _="N"
then "NON-MEMBER"
else if _="X"
then "DO NOT USE"
else if _="D"
then "PFP-RED"
else if _="Y"
then "NEW VENDOR"
else null
}
),
#"Removed Duplicates" = Table.Distinct(#"Replaced Value", {"Vendor Clasification"}),
#"Removed Other Columns" = Table.SelectColumns(#"Removed Duplicates",{"Vendor Clasification"})
in
#"Removed Other Columns"

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-janeyg-msft
Community Support
Community Support

Hi, @pkoel-asb 

 

It’s my pleasure to answer for you.

According to your description,I think you can try to simplify your query.

Like this:

try the following formula:
let
Source = Sql.Databases("asb-cdw-sql01"),
ACESREPORTING = Source{[Name="ACESREPORTING"]}[Data],
Vendor_Dashboard = ACESREPORTING{[Schema="Vendor",Item="Dashboard"]}[Data],
#"Renamed Columns" = Table.RenameColumns(Vendor_Dashboard,{{"Sum_Amount", "Sales"}, {"VendorID", "Vendor"}, {"Name1", "Vendor Name"}, {"ProductType", "Vendor Type"}, {"Sales_Month", "MONTH"}, {"Sales_Year", "YEAR"}, {"DeptID", "OMBU"}, {"Vendor_Class", "Vendor Clasification"}, {"Sales_FullName", "Rep Name"}}),
#"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns",{"Sales", "Product", "Vendor", "Vendor Name", "Vendor Type", "MONTH", "YEAR", "OMBU", "Vendor Clasification", "Rep Name", "ID", "LastUpdated"}),
#"Replaced Value" = Table.TransformColumns(#"Reordered Columns",{"Vendor Clasification",each
if _="E"
then "Employee"
else if _="R"
then "OUTSIDE PARTY"
else if _="P"
then "PFP-PATRIOT"
else if _="B"
then "PFP-BLUE"
else if _="G"
then "PFP-GRAY"
else if _="W"
then "PFP-WHITE"
else if _="C"
then "ASB CORPORATE VENDOR"
else if _="N"
then "NON-MEMBER"
else if _="X"
then "DO NOT USE"
else if _="D"
then "PFP-RED"
else if _="Y"
then "NEW VENDOR"
else null
}
),
#"Removed Duplicates" = Table.Distinct(#"Replaced Value", {"Vendor Clasification"}),
#"Removed Other Columns" = Table.SelectColumns(#"Removed Duplicates",{"Vendor Clasification"})
in
#"Removed Other Columns"

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.