Forum Discussion
@cumulative sum
Hi, neeharikathota
According to your picture, I found that your data column [SWAP Rate Date] is not correctly sorted, which leads to you can’t achieve the cumulative sum. You can follow my steps:
- Open power query editor, select the column you want to based on to achieve cumulative sum([SWAP Rate Date]), can click this:
- Add an index column as the cumulative key, like this:
- Create this measure:
Cumulative Sum =
CALCULATE(
SUM(Append2[SWAP Values]),
FILTER(ALLSELECTED('Append2'),Append2[Index]<=MAX('Append2'[Index])))
- Create a table chart and place columns, like this:
And you can get what you want.
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- neeharikathota5 years agoFrequent Visitor
Hi Robert ,
Thanks for your suggestions before , that helped a lot .
Iam trying to achieve cumulative sum based on Period date thats is repeating . So my cumulative sum should be grouped based on repeating Period dates . Can you help me achieve the 'Cumulative Expected Return expected result ' . As highlightes in red .. 35499=5559+5559+24381 for 01/05/2020 .
- v-robertq-msft5 years agoCommunity Support
Hi, neeharikathota
According to your requirement, you can try this measure:
Cumulative Return expected result = CALCULATE( SUM('Table'[Return]), FILTER(ALLSELECTED('Table'),'Table'[Period Date]<=MAX('Table'[Period Date])))And this is my test pbix file:
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.