Forum Discussion
ryan_mayu
5 years agoSuper User
Running total
hi all,
I have a sample data.
ID
date
value
a
2021/1/1
100
a
2021/2/1
200
a
2021/4/1
300
a
2021/5/1
500
b
2021/3/1
600
b
20...
- 5 years ago
Value cumulate : =
VAR _viewvalue =
CALCULATE ( MAX ( Data[date] ), REMOVEFILTERS () )
RETURN
IF (
HASONEVALUE ( 'Calendar'[Month Name] ),
IF (
MIN ( 'Calendar'[Date] ) <= _viewvalue,
CALCULATE (
SUM ( Data[value] ),
FILTER (
ALL ( 'Calendar'[Date] ),
'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
)
)
)
)https://www.dropbox.com/s/fhitbnc2v1dnxrt/ryan.pbix?dl=0
- 5 years ago
Hi,
Just change the cross filter direction to Single. See image below:
ryan_mayu
5 years agoSuper User
thanks for your help. This also solved the problem why I can't get the result which Jihwan_Kim provided. just a littele change, the results are totally differrent. For me,still need to keep learning from experts like you.
thanks for your help. you soluition works as well.
Ashish_Mathur
5 years agoSuper User
You are welcome. Thank you for your kind words.