Forum Discussion

jjbates's avatar
jjbates
Regular Visitor
9 years ago
Solved

SUMIF in Query Editor on Power BI Desktop?

I am trying to do a simple sumif in the Query Editor of the PowerBI desktop. I cannot edit the source data, so I need a calculated column as a new column that simply sums one column if it matches the...
  • v-qiuyu-msft's avatar
    9 years ago

    Hi jjbates,

     

    You can open Query Editor, use Group By feature:

     

     

    The backend M formula is below:

     

    = Table.Group(dbo_DimSalesTerritory, {"SalesTerritoryGroup"}, {{"Total", each List.Sum([SalesTerritoryKey]), type number}})

     

    Best Regards,
    Qiuyun Yu