I’m seeing a lot of messages where people ask the question to get the max dimension, so they can aggregate the table.
Quantity is set as sum and for material we display the Material with the highest quantity.
If you use: a variable set as measure and formula: max([material], you will get the wrong result, because he is not looking at the quantity (webi is not that smart). this results in MatE.
- Create variable (measure): max =Max([Quantity] ForEach([Material];[Category];[Country]))
With this formula we get the max value over Material
- Create variable (measure): mat_max =Max([Material] Where([Quantity]=[max] ForAll([Material])))
With this formula we retrieve the Material with the max value regardless “material”, so for us it means we retrieve MatE because the max over material for france is 35
So we see he filters out the Materialgroup in mat_max, only the material with max value is selected, otherwise is set to blank.
If we set the formula ([Material] Where([Quantity]=[max] ForAll([Material]))) to max, it will show only the material that is not blank, check out document:
Check Double Check