Forum Discussion

hidenseek9's avatar
hidenseek9
Post Patron
1 year ago
Solved

Calculating a total value within a filtered context

I am having a trouble calculating a total value within a filtered context.    I want to calculate a total sales and total volume, within the filtered context.  How can I achieve this?  The total ...
  • bhanu_gautam's avatar
    1 year ago

    hidenseek9 , Try using

    dax
    TotalSalesFiltered =
    CALCULATE(
    SUM('ACT Data'[Value]),
    'ACT Data'[Phase] = "Actus",
    'ACT Data'[Line Item] = "Net Sales",
    NOT('ACT Data'[Brand] IN {"New Product", "Discontinued"}),
    ALLEXCEPT(MasterMapping, MasterMapping[Macro Brand])
    )

    TotalVolumeFiltered =
    CALCULATE(
    SUM('ACT Data'[Volume]),
    'ACT Data'[Phase] = "Actus",
    'ACT Data'[Line Item] = "Net Sales",
    NOT('ACT Data'[Brand] IN {"New Product", "Discontinued"}),
    ALLEXCEPT(MasterMapping, MasterMapping[Macro Brand])
    )