Forum Discussion
ianwuk
8 years agoHelper 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 ...
v-huizhn-msft
8 years agoMicrosoft 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])
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 formularesult
Best Regards,
Angelia