Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have table with below data
CNO | TARGET% | ACHIEVED% |
36 | 100 | 100 |
29 | 100 | 100 |
I want to reduce the value in column "TARGET%" by 0.50 if the value in column "CNO" is 36.
In Query Editor I am using Table.ReplaceValue to change the value in "TARGET%" column based on "CNO" column with below code
= Table.ReplaceValue(#"Replaced Value",each [TARGET%],each if [CUSTOMER NO] = 36 then [TARGET%] - 0.50 else [TARGET%],Replacer.ReplaceValue,{"TARGET%"})
However it is giving me below error.
Now if I rename column "TARGET%" to "TARGET", it works perfectly.
If anybody can please advise how to use Table.ReplaceValue without renaming the column name from "TARGET%" to "TARGET".
Thanks & Regards,
Vikram.
Solved! Go to Solution.
Hi @vikrammankar,
Please replace [TARGET%] as [#"TARGET%"], the new formular liek below:
= Table.ReplaceValue(#"Replaced Value",each [#"TARGET%"],each if [CNO] = 36 then [#"TARGET%"] - 0.50 else [#"TARGET%"],Replacer.ReplaceValue,{"TARGET%"})
Best Regards,
Qiuyun Yu
Hi @vikrammankar,
Please replace [TARGET%] as [#"TARGET%"], the new formular liek below:
= Table.ReplaceValue(#"Replaced Value",each [#"TARGET%"],each if [CNO] = 36 then [#"TARGET%"] - 0.50 else [#"TARGET%"],Replacer.ReplaceValue,{"TARGET%"})
Best Regards,
Qiuyun Yu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |