I’m facing an issue while trying to display brand names associated with the lowest out-of-stock value. Here’s what I’ve attempted so far:
- I have a dataset containing fields such as ‘Brand’, ‘Out of Stock Value’, and others.
- I created two calculated fields :
- ‘MinOutOfStockValuePerBrand’: Calculated using
minOver({Out of Stock Value}, [Brand])to find the minimum out-of-stock value per brand. - ‘BrandWithMinOutOfStockValue’: Initially used
ifelse({Out of Stock Value} = ${MinOutOfStockValuePerBrand}, [Brand], NULL)but encountered an error due to mixing aggregated and non-aggregated fields. ( Error : Mismatched aggregation. Custom aggregations can’t contain both aggregated and nonaggregated fields, in any combination.)
Please not that BrandWithMinOutOfStockValue : should return brand name with lowest out of stock value.
Also, note that {Out of Stock Value} is a calculated field.
I want to create a visual (such as a line chart or other suitable type) that specifically displays the brand name with the lowest out-of-stock value. The calculated field that i am trying to create will be added as a measure in an already existing line chart.
Could anyone assist me in understanding the error in the calculation? Additionally, any guidance on how to correctly filter and display only the brand with the lowest out-of-stock value would be helpful.