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,
Looking to replace all values 'X1' in column A with values 'X2' using M language. Can't duplicate column A.
Condition is that only replace the values for date range between 01/01/20 to 06/06/20 using column 'Date' in same table.
Solved! Go to Solution.
Hi, @Qotsa
try the code below:
= Table.ReplaceValue(
YouPreviousStepName,
each [Date]>=#date(2020, 01, 01) and [Date]<=#date(2020, 06, 06),
each [column A]="X1",
(x,y,z)=>if y and z then "X2" else x,
{"column A"}
)
Hi, @Qotsa
try the code below:
= Table.ReplaceValue(
YouPreviousStepName,
each [Date]>=#date(2020, 01, 01) and [Date]<=#date(2020, 06, 06),
each [column A]="X1",
(x,y,z)=>if y and z then "X2" else x,
{"column A"}
)
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 |
---|---|
100 | |
54 | |
21 | |
12 | |
11 |