Forum Discussion
Creating a column based on whether other columns are empty or not
Hi,
I have a table (Part_numbers) with a lot of product data and with that, a lot of empty fields.
I'd like to create a column that gives me a number based on how many of the fields per row are not empty.
For example:
The part in red (sum) is what I'd like to create. It shows how many fields per row are actually filled in.
I thought about filling every empty cell with a 1 and use that to create a sum, but I wouldn't be able to differentiate that from field that actually have 1 as a proper value.
Maybe I'm approaching this the wrong way, so feel free to suggest something completely different. Basically, I'd like to order the table on richness, for which I reckoned having such a column would be the easiest trick. Thanks!
1 Reply
- AnonymousNot applicable
Found one solution myself. Not the prettiest, but I suppose it does the job.
I created a calculated column:
sum = IF(ISBLANK(Part_numbers[Weight]), 0, 1) + IF(ISBLANK(Part_numbers[Dimension]), 0, 1) + IF(ISBLANK(Part_numbers[Description]), 0, 1) + IF(ISBLANK(Part_numbers[CoO]), 0, 1)
The actual table I'm working with is much larger and it's not really a scaleable solution, but for now it does the trick.