Forum Discussion

LizziePeters's avatar
LizziePeters
Icon for Helper I rankHelper I
6 years ago
Solved

sumifs in Power BI

Hi, I am trying to work out a way to sum up some values in a column if based on 2 or more criteria.

Using the below example, I would like to create a formula that sums the 'total rights' column IF the Year is 2019 and the Deal ID is 34.

 

Thank you so much for your help!

 

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi LizziePeters ,

    You can create two slicers base on field Year and Deal ID and create the related visual using the aggregate (Sum) of field Total Rights just as below screenshot.

    Best Regards
    Rena
    Community Support Team _ Rena Ruan
    If this post helps, then please consider Accept it as the solution to help the other members find it more.

4 Replies

  • LizziePeters , Try as measure or column

     

    sumx(filter(Table, Table[year] =2019 && Table[deal Id] =34),Table[total rights])

    • LizziePeters's avatar
      LizziePeters
      Icon for Helper I rankHelper I

      Thank you so much for the quick response!  How about if I want to do this for a much wider dataset?  Ie I don't want to mention "2019" and "34" in my formula?  I would just like the formula to look at the cells in that given column?  Thank you so much!

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi LizziePeters ,

        You can create two slicers base on field Year and Deal ID and create the related visual using the aggregate (Sum) of field Total Rights just as below screenshot.

        Best Regards
        Rena
        Community Support Team _ Rena Ruan
        If this post helps, then please consider Accept it as the solution to help the other members find it more.