Forum Discussion
Johonnatan
Helper I
3 years agoMatrix with previous calculation
Hi there I am currently working on a solution that needs to sum activities hours per user and makes a calculation based on static expected hour. Basically, a user can work in different activities...
- 3 years ago
Hi Johonnatan ,
Please try:
First create an index column:
Then apply the measure:
Measure = SELECTEDVALUE('Table'[Expected])-SUMX(FILTER(ALL('Table'),[Index]<=SELECTEDVALUE('Table'[Index])&&[User]=SELECTEDVALUE('Table'[User])),[Hours])Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jianboli-msft
Community Support
3 years agoHi Johonnatan ,
Please try:
First create an index column:
Then apply the measure:
Measure = SELECTEDVALUE('Table'[Expected])-SUMX(FILTER(ALL('Table'),[Index]<=SELECTEDVALUE('Table'[Index])&&[User]=SELECTEDVALUE('Table'[User])),[Hours])
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.