Forum Discussion
bigrods
5 years agoHelper III
Subtract previous Column total from current row per ID
Hi everyone, I have searched for an answer to this, but have got stuck in a muddle with DAX so hoping someone could please put me out of my misery! I have a dataset where I need to calculate the ...
- Anonymous5 years ago
Hi bigrods ,
Try this calculated column
Process = IF ( [Lesson No] = 2, CALCULATE ( SUM ( tbl_Assessment[Score] ), FILTER ( ALLEXCEPT ( 'tbl_Assessment', tbl_Assessment[Student ID] ), [Lesson No] = 2 ) ) - CALCULATE ( SUM ( tbl_Assessment[Score] ), FILTER ( ALLEXCEPT ( 'tbl_Assessment', tbl_Assessment[Student ID] ), [Lesson No] = 1 ) ) )You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hi bigrods ,
Try this calculated column
Process =
IF (
[Lesson No] = 2,
CALCULATE (
SUM ( tbl_Assessment[Score] ),
FILTER (
ALLEXCEPT ( 'tbl_Assessment', tbl_Assessment[Student ID] ),
[Lesson No] = 2
)
)
- CALCULATE (
SUM ( tbl_Assessment[Score] ),
FILTER (
ALLEXCEPT ( 'tbl_Assessment', tbl_Assessment[Student ID] ),
[Lesson No] = 1
)
)
)
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bigrods
5 years agoHelper III
Great, thanks so much - this has done the trick - and thanks to Mikelytics and sanalytics for their assistance too.