Find a dimension value based on the average of measure
So, I have this example table with the 3 measurements determined by the formula:
And I would like to turn it into something close to this table
So, I need to find which brand has the lowest average price, and the same for the highest average price. And check if my brand is below the average of the lowest priced brand or above the average of the highest priced brand.
But I have some limitations, they are: The brands will vary according to another dimension (for example: seller) and I should ignore null values
I've tried several ways but all were extremely large (taking up 30 lines of code for 1 seller)