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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
SammiF1244
Helper I
Helper I

I am unable to get my query to run due to an issue with my replaced value.

I am sure it is my own error, as I am new, but I do not recall changing anything. 

The replace values I need to allow the column to remain, but the row data needs to be blanked out. I found a trick to change the data type to one that will produce an error, replace error, then change data type back (and changed all the other data types to text --needed for a software import data requirement). When I added that code, it saved with no syntax error, but when the query runs it shows this.  I hope this makes sense. (THANK YOU--- this group has been great!! I hope I can start giving back soon :))

SammiF1244_2-1698988820755.pngSammiF1244_3-1698988873539.png

 

Here is the full code:

 

let
Source = Table.Combine({#"Aldera ADD", #"Aldera DELETE", #"Aldera MODIFY"}),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Relation", Percentage.Type}}),
#"Replaced Errors" = Table.ReplaceErrorValues(#"Changed Type", {{"Relation", 0}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Replaced Errors",{{"Relation", type text}}),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type1",null,"",Replacer.ReplaceValue,{"Relation"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","0","",Replacer.ReplaceText,{"Relation"}),
#"Changed Type2" = Table.TransformColumnTypes(#"Replaced Value1",{{"Effective_Date", type text}, {"Termination_Date", type text}, {"DateTimeModified", type text}, {"Key_2", type text}, {"Key_3", type text}, {"Key_4", type text}, {"Key_5", type text}, {"Key_6", type text}, {"Key_7", type text}, {"Key_8", type text}, {"Key_9", type text}, {"Key_10", type text}, {"Type", Int64.Type}})
in
#"Changed Type2"

2 ACCEPTED SOLUTIONS
rubayatyasmin
Super User
Super User

Hi, @SammiF1244 

 

check if the relation column value contains all percentage convertable values. If not then it will produce error. Also check for the change type2 where you are changing the type of several cols. make sure every column value is convertable to integer. 

 

Also,  try to check every query steps to find out which step is generating errors. 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


View solution in original post

SammiF1244
Helper I
Helper I

Replace values with blanks using the data type work around is throwing an error no matter what I try. So, I deleted the column, added a new column as ="" with the same name and reordered it. It worked :). 

View solution in original post

2 REPLIES 2
SammiF1244
Helper I
Helper I

Replace values with blanks using the data type work around is throwing an error no matter what I try. So, I deleted the column, added a new column as ="" with the same name and reordered it. It worked :). 

rubayatyasmin
Super User
Super User

Hi, @SammiF1244 

 

check if the relation column value contains all percentage convertable values. If not then it will produce error. Also check for the change type2 where you are changing the type of several cols. make sure every column value is convertable to integer. 

 

Also,  try to check every query steps to find out which step is generating errors. 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors