Forum Discussion
Guyakobov
7 years agoHelper II
previous value
HI, I would like to get the previous value. so when I choose date 12.03.18 my profit will be -123960.45 and not -116778.37 http://prntscr.com/mtzgw5 Thanks
v-jiascu-msft
7 years agoMicrosoft Employee
Hi Guyakobov ,
You should select Login too. Or SELECTEDVALUE('floating pl'[Login]) is blank. Please give it a try.
Best Regards,
Guyakobov
7 years agoHelper II
HI,
still doesn't work, I want a column that will give me the previous row with separation from each account.
Thanks
- v-jiascu-msft7 years agoMicrosoft Employee
Hi Guyakobov ,
You mean you need a calculated column. If so, you can't make it dynamic with a slicer. Please try out the formula below as a calculated column.
Previous = VAR currentAccount = [account] VAR currentTime = [time] VAR previousDate = CALCULATE ( MAX ( 'table'[time] ), FILTER ( 'table', 'table'[account] = currentAccount && 'table'[time] < currenttime ) ) RETURN CALCULATE ( SUM ( 'table'[profit] ), FILTER ( 'table', 'table'[account] = currentAccount && 'table'[time] = previousDate ) )
Best Regards,
- v-jiascu-msft7 years agoMicrosoft Employee