Forum Discussion
Change value based on value in other column
- 8 years ago
You may refer to the following DAX that adds a calculated column.
Column = IF ( Table1[Column1] IN { "", "#" } && NOT ( Table1[Column2] IN { "x", "y", "z" } ), TRUE (), FALSE () )
Sounds like it's a job for a conditional column in Power Query, doing it backwards to how you describe - have your new column equal the country column if the third column equals x, y or z, then what you've got left are just the entries that you would want to change, you can then have it look at the value of the country column and change it as necessary for each instance (#, blank) you need to, having it maintain the value of the country column at the end for those where you don't need to change it.
- MarcelBeug8 years ago
Community Champion
A few remarks:
First, you don't mention what the changed value should be.
Second, if a column is added, then this column will be populated with values for all rows.
So you need to define what the value would be if the condition is met and what the value would be if the condition is not met.
Is Power Query OK or do you need DAX?