I have a power pivot summarising sales data on various levels of hierarchy.
I have added a picture showing data structure and expanded examples to be more illustrative.
The data has products and countries.
My task is to return a "category total" of sales, which should respect all geographical filters, but ignore product filters.
This is the DAX I am using
Sales Total:=SUM([Volume])
(this measure is an explicit sum of original volume data field)
Category Totals:=
CALCULATE( [Sales Total],
ALL(TBL[brand],
TBL[Sub-brand],
TBL[SKU]
)
)
this is the measure where I'm trying to capture totals above product level - called "Category" because it sums up all products in a geographical set, be it a market, region, sub-region.
Problem 1: when geographical field is filtered indirectly, sub-totals do not reflect that (i.e. market doesn't have for Brand 2).
Problem 2: if a product attribute (i.e. Brand) is higher in hierarchy of row fields than geographical (i.e. market etc), sub-totals on that level show a global total at all times instead of sub-totalling regions/markets that they belong to.
[Volume]
is a measure, how is it being calculated? I see you have only one table with all your data, add additional details about the columns and applied filter in order to reproduce your issue. – alejandro zuleta