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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ianwuk
Helper III
Helper III

How to manually replace one value in a table?

Hello.

 

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?  

 

The reason being is that the AMOUNT value is used for other custom columns in the same table and creating an additional custom column of the AMOUNT column would make it confusing.

 

I saw the thread here on this but I did not understand it.  It seems to be what I want to do, specifically the DAX formula part to replace the value directly.  But I do not understand how to do it.

https://community.powerbi.com/t5/Desktop/Replacing-just-1-value-in-a-table/m-p/75871/highlight/true#...


Can someone please help me edit just one value?  The replace values option replaces all values.  Not just single ones.

Thanks.

ianwuk

2 REPLIES 2
Anonymous
Not applicable

Hello

You can find the solution with all the steps to take and make changes on PowerQuery on Yoda Learning.com following this link

https://yodalearning.com/tutorials/learn-how-replace-values-power-query/

 

Hope this help

 

v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @ianwuk,

One way is to create a calculated column using DAX in Power BI desktop interface. Please use the formula below and get expected New_AMOUNT column.

New_AMOUNT = IF(Table1[ORDERID]=2,60,Table1[AMOUNT])


1.PNG

Another way is to create a custom column in Query Editor using Power Query, click add column->custom column, type the formula.

=if [ORDERID]=2 then 60 else [AMOUNT]

type formulatype formularesultresult
Best Regards,
Angelia

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.