Forum Discussion
cumulative sum issue
Hi, I have the following problem: I have used the following measure to calculate the cumulative sum:
This should be the sum of entries in the table:
mit IV = DISTINCTCOUNT(Kunde[amsidnr])
IV = CALCULATE ( KUNDE[mit IV]; FILTER( ALL(KUNDE[INSERTDATE].[Date]); KUNDE[INSERTDATE].[Date] <= MAX(KUNDE[INSERTDATE].[Date])))
Hi Anonymous,
This measure should work.
IV = CALCULATE ( KUNDE[mit IV], FILTER( ALLSELECTED(KUNDE), KUNDE[INSERTDATE] <= MAX(KUNDE[INSERTDATE]) ))
Best regards,
Yuliana Gu
21 Replies
- v-yulgu-msft
Microsoft Employee
Hi Anonymous,
This measure should work.
IV = CALCULATE ( KUNDE[mit IV], FILTER( ALLSELECTED(KUNDE), KUNDE[INSERTDATE] <= MAX(KUNDE[INSERTDATE]) ))
Best regards,
Yuliana Gu
- AnonymousNot applicable
v-yulgu-msft Thanks!
- AlB
Community Champion
Hi Anonymous
Can you share the pbix? Or at least show the structure of your data model?
- AnonymousNot applicable
AlB Thanks for the help!
I have a Table called KUNDE with the following columns:
amsidnr : a distinct number assigned to each customer
INSERTDATE : the date when the new customer was added to the table
mit IV : number of different amsidnr in the table
IV : cumulative sum of mit IV over time INSERTDATE
I managed to solve he issue temporarily by setting boundaries to my x-axis, but i don`t want to update those boundaries every day. Without them the visualization would show me data for all the months of 2019.
- AlB
Community Champion
Anonymous wrote:The formula works fine, but when I use the measure in a graph it shows me all the upcoming months for this year with the value being the same. I only want to see the graph for the monthsuntil now. The slicers don't seem to work. I have no data for the months after January 2019.Anonymous
What measure are you referring to? You say they are all calculated columns
- AnonymousNot applicable
- AnonymousNot applicable
I use IV in a graph with INSERTDATE being the x-axis
- themistoklis
Community Champion
Anonymous
At the graph do you use the date field from a custom calendar?
If yes then you need to use the date field from the actual table
- AnonymousNot applicable
I use the date field from my table.
- themistoklis
Community Champion
Anonymous
If you dont have data after Jan 2019 how do you see the following months then??
Any chance to share your file with us?