Forum Discussion
Anonymous
7 years agoNot applicable
replace null values with content from another column based on condition
I have 20 million rows loaded. I want to replace null values from Column B. The value to be replaced will depends on what value is indicated on the column a. Example: For null values, 1 = W ...
- 7 years ago
Hi Anonymous,
Did you get any error messages? Or it returns wrong results?
Maybe this one.
Result_Column = IF ( [Column B] = blank(), LOOKUPVALUE ( 'FixTable'[Letter], 'FixTable'[Number], [Column A] ), [Column B] )Best Regards,
v-jiascu-msft
7 years agoMicrosoft Employee
Hi Anonymous,
Where are all the replacements? In other words, where is "1 = W 4 = E" from? It could be like this one.
Result_Column = IF ( ISBLANK ( [Column B] ), LOOKUPVALUE ( 'replacementsTable'[result], 'replacementsTable'[Column A], [Column A] ), [Column B] )
Best Regards,
Anonymous
7 years agoNot applicable
it will come from a separate table called "FixTable" and here is the sample data inside it. Data in the "FixTable" are only those numbers with blank letters.
I tried using your code but it did not work. can you check what was wrong with it?
Result_Column =
IF (
ISBLANK ( [Column B] ),
LOOKUPVALUE (
'FixTable'[Letter],
'FixTable'[Number], [Column A]
),
[Column B]
)- v-jiascu-msft7 years agoMicrosoft Employee
Hi Anonymous,
Did you get any error messages? Or it returns wrong results?
Maybe this one.
Result_Column = IF ( [Column B] = blank(), LOOKUPVALUE ( 'FixTable'[Letter], 'FixTable'[Number], [Column A] ), [Column B] )Best Regards,
- Anonymous7 years agoNot applicable
hey it works! thanks v-jiascu-msft