Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Converting a basic Excel formula into DAX for a new column in Power BI

I'm trying to create a new column in Power BI Desktop which replicates a basic Excel formula which seems simple enough.     The Excel formula which I am trying to replicate is in column D: =IF(B2=...
  • Johanno's avatar
    8 years ago

    You could shift one column using:

     

    Shifted column = LOOKUPVALUE(Table1[Cage No];Table1[Index Order];Table1[Index Order]-1)

     

     

    or you could get the result directly by using:

    Reported size = IF(Table1[Cage No]=LOOKUPVALUE(Table1[Cage No];Table1[Index Order];Table1[Index Order]-1);0;Table1[Size])