I have a table here:
I'd like to make power pivot that looks at the value at a prior time even if there isn't a value in the current time
srev = sum(value)
b.prev at 2 = 4 which is the same as srev at 1.
a.prev at 2 is blank because there is no row at 2. But there is a prev value at 2. It should be 3. So what's the right equation.
Also I'd like another equation that equals 1 when prev is 1 and srev = 0 grouped by company. Then the grand total should be = 1 in time 2 because a should have been 1 in time 2 and b should be 0. I did:
countx = sumx(addcolumns(summarize(table1,table1[customer]),"srev",[srev],"prev",[prev]),if([srev]>0&&prev=0,1,0)))
This didn't work because the addcolumns thingy showed blanks for both srev and prev.