Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

avoid double count, power query equivalent for excel solution?

Hello,   I'm trying to find an equivalent or alternative solution for below excel example. Column B containts the (original) quantities, column C the calculated ones, where the value is set to 0 (z...
  • v-juanli-msft's avatar
    7 years ago

    Hi Anonymous 

    In Power BI, before any transformation,

    firstly you could go to Home->Edit queries,

    Add column->add an index column from 1,

    Then close&&apply and return to Report view, 

    Create measures

    Measure = CALCULATE(MIN(Table1[Index]),ALLEXCEPT(Table1,Table1[id]))
    
    Measure 2 = IF(MAX(Table1[Index])=[Measure],SUM(Table1[q]),BLANK())

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.