Forum Discussion

sachingarg's avatar
sachingarg
New Member
9 years ago
Solved

SUMIF in Power BI Desktop?

I have two columns Product ID and value. The Product ID is repeated several times in the data and I need to do a sum of value for each Product ID and store this into a new column such that the same s...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi sachingarg,

    If your table has no index column, please firstly add index column to your column in Query Editor of Power BI Desktop. Then in Power BI Desktop Report view, create the following calculated columns by right-clicking your table and selecting “New Column”, this way you will get expected result in a table visual.

    SumColumn = CALCULATE(SUM(Table[Lost Service]),ALLEXCEPT(Table,Table[Sales Order Number]))
    Service Level Met = IF(Table[SumColumn]<1,"Achieved","Lost")

     


    Thanks,
    Lydia Zhang