Forum Discussion
Need help: Cumulative sum function only returns total
- 3 years ago
Hi Renate,
Try this as a measure instead, making sure to use dDato fields in visuals, not fact table dates:
_cumulativeSum = VAR __cDate = MAX(dDato[Date]) RETURN CALCULATE( SUM(OversiktKurs[Deltagere kurs]), FILTER( ALLSELECTED(dDato), dDato[Date] <= __cDate ) )Pete
Hello Pete,
Thank you for the formula!
It seems I may have created a circular dependency as my Date table is created and based on the dates in my fact table;
Hi Renate,
There's no need to swap out anything in the measure I gave you. It should work exactly as it is.
Please try the measure exactly as I wrote it and let me know how you get on.
Pete
- RenateBK3 years agoHelper II
I am receiving a circular dependency error - I fear it may be due to how I created my date table.
- BA_Pete3 years agoSuper User
Are you trying to create this as a calculated column rather than a measure?
You shouln't get a circular dependency when creating a measure as your dDato table would not get recalculated at thatpoint.
Pete
- RenateBK3 years agoHelper II
You are correct, it completely slipped my mind.
It worked now, thank you so much for your help.
Best regards,
Renate