Forum Discussion
Anonymous
8 years agoNot applicable
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=...
- 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])
Johanno
Continued Contributor
8 years agoYou 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])
- Anonymous8 years agoNot applicableThank you so much, this is exactly what I was looking for. I've been trying to figure out how to use the index order column to solve this for a whole week. Thank you!