Forum Discussion
Baconbomb
Helper I
8 years agoChange value based on value in other column
Hi. I have a column where i want to change the value IF its blank or # and if the value in a different column is NOT "x" or "y" or "z" To explain it a little better. So the column i want to cha...
- 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 () )
v-chuncz-msft
Community Support
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 ()
)
- Baconbomb8 years ago
Helper I
Maybe im missing something or its the way my data is formulated but here is the "translation" of your formula that i made and i get an error
Country = IF( 'All trafik Nat, roam och data'[Land/Country]={"";"#"} && NOT 'All trafik Nat, roam och data'[Call Descr]={"I utländska nät";"GPRS/3G i utlandet";"Till fastnät utomlands";"SMS till utlandet";"Till mobil utomlands"}; "Sweden"; 'All trafik Nat, roam och data'[Land/Country])A table of multiple values was supplied where a single value was expected.
- v-chuncz-msft8 years ago
Community Support
- Baconbomb8 years ago
Helper I
Missed them. Now it works.
Thanks for the help.