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
Anonymous
Not applicable

How can I replace single value

How can I replace "single" selected value instead of ALL?  in below case, can i just replace 1 "account fee" to other values and leave another "account fee" as it is.  If I replace Value like below, the other 'account fee' will be replaced too. 

 

SP.PNG 

1 ACCEPTED SOLUTION
Cfarinha
Frequent Visitor

Do you mean a single value for a specific row? 

I would create a temporary conditional column that looks for a combination of that value and some other grouping of field values on that row that make it unique. Then create a second column that keeps the value if the result of the first column is false and changes it when true. Then delete the old column along with the first calculated column. Might look something like this:

 

Check column: if [Other Party] = "ACCOUNT FEE" and [RecID] = "12345" then True else False

New Other Party Column: if [Check Column] = True then "Replacement value" else [Other Party]

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

As of right now, I do not think there is a one step solution to this issue. I have not found functionality in the transform tab to place a single value coresponding to one row and column.

 

A solution I used to get around this was to create a custom column with the following:

 

If [value column you want to change] = [unique row identifier (primary key)] then "value you want to change", else [value column you want to change]

 

notice in this solution you must have a primary key to identify the row you would like to change.

 

I hope this helps

Cfarinha
Frequent Visitor

Do you mean a single value for a specific row? 

I would create a temporary conditional column that looks for a combination of that value and some other grouping of field values on that row that make it unique. Then create a second column that keeps the value if the result of the first column is false and changes it when true. Then delete the old column along with the first calculated column. Might look something like this:

 

Check column: if [Other Party] = "ACCOUNT FEE" and [RecID] = "12345" then True else False

New Other Party Column: if [Check Column] = True then "Replacement value" else [Other Party]

 

 

Hi i had the same problem, 

 

Creating a custom column would do the trick, but also formatting the data in the Original Source,

 

For example if it came from Excel, Then you may want to make the changes in Excell in the future. This also speeds up data processing for speed as well 

 

 

I have the same question please.

 

Here is my situation @Cfarinha.

I have an orders table that looks like this:

 

ORDERID   AMOUNT

          1          100

          2           159

          3           400

          4            543

 

How can I change it so that in the AMOUNT column, for ORDERID 2 the AMOUNT is changed to 60?

 

I tried creating a custom column that looked like this:

 

(IF [ORDERID] = 2 then AMOUNT = 60 ELSE AMOUNT = AMOUNT)

 

This did not work and returned boolean values in the custom column.

 

Ideally I just want to change it in the AMOUNT column directly for the specific row. How can that be done?  

Based upon your solution above, would it work for me?  Where does the RecID value come from?

Thanks.
ianwuk

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.