How to create a set analysis for different aggregations Drill down dimension using flag
I have a calendar and inventory details (Sales, Purchases). I have created the data model and now I am trying to calculate Average Inventory, which will be based on a drill down dimension of years-> Month.
Average Inventory for Year = Inventory end of Each month (1-12)/ Number of months based on the date flag (Is_MonthEnd_Flag).
But when I drill down to the year which would display all months, it should display actual inventory at the end of the month.
Any idea how this can be achieved using set analysis?