I have a tables of companies with attributes and attributes weights like this:
| attr_1 | attr_2 | attr_3 | attr_4 | |
|---|---|---|---|---|
| attr_weight | 1 | 2 | 1 | 3 |
| attr_1 | attr_2 | attr_3 | attr_4 | result | |
|---|---|---|---|---|---|
| company_1 | + | + | + | 4 | |
| company_2 | + | + | + | 5 | |
| company_3 | + | + | + | + | 7 |
So how can I connect attributes with their weights to be able to change attribute weights dynamically if necessary. For example, if I change attr_1 to 2, then the Result field will increase by 1 for all companies
I can’t even generate the right search query, I need at least the name of the desired function
>Solution :
You may try the following formula-
=SUM(XLOOKUP(FILTER($B$5:$E$5,B6:E6="+"),$B$1:$E$1,$B$2:$E$2))
For older versions could try-
=SUMPRODUCT(($B$2:$E$2)*(B6:E6="+"))
