Forum Discussion

alsm's avatar
alsm
Icon for Helper III rankHelper III
3 years ago
Solved

calculate sum with multiple criteria

Hello I have a table that somewhat looks like Industry Sub-Industry Volume Energy Equipment & Services Drilling 100 Energy Equipment & Services Oil & Gas Equipment & Services 150 ...
  • Nathaniel_C's avatar
    3 years ago

    Hi alsm ,

    There are many ways to write this, however this works:

    Sum =
    CALCULATE (
        SUM ( IndustryResearch[Volume] ),
        FILTER (
            IndustryResearch,
            IndustryResearch[Industry]
                IN { "Energy Equipment & Services", "Oil, Gas & Consumable Fuels" }
                && IndustryResearch[Sub-Industry] = "Drilling"
        )
    )
        + CALCULATE (
            SUM ( IndustryResearch[Volume] ),
            FILTER (
                IndustryResearch,
                IndustryResearch[Industry] = "Metals & Mining"
                    && IndustryResearch[Sub-Industry] = "Diversified Metals & Mining"
            )
        )
    





    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
    Nathaniel