Forum Discussion

Jz77777's avatar
Jz77777
New Member
2 years ago
Solved

Using Previous Value in column Calculate that references other columns

Hi Everyone,   I been tasked with taking an excel model that somehow doesn't have circular dependancies and automate it with Power BI.  The calculated column I am trying to create uses the previous v...
  • amitchandak's avatar
    2 years ago

    Jz77777 , we can not do the recursive calculations in power bi.

     

    You need thing if cumulative can do that

    example

    Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw

     

    example with date table

     

    Onhand BOP= CALCULATE(SUM(Table[Ordered]),filter(all(date),date[date] <min(date[date]))) -
    CALCULATE(SUM(Table[Sold]),filter(all(date),date[date] <min(date[date])))


    onhand EOP= CALCULATE(SUM(Table[Ordered]),filter(all(date),date[date] <=Max(date[date]))) -
    CALCULATE(SUM(Table[Sold]),filter(all(date),date[date] <= Max(date[date])))