Forum Discussion
Anonymous
6 years agoNot applicable
Running total with date slicer from another table
Hi, I have two tables. One is "Sales" table and the other one is "Period" table. In the "Sales" table, I have "Product", "Sales Amount", and "Dates" columns. In this table have data for Jan, Feb...
sanimesa
Post Prodigy
6 years agoAnonymous Assuming you have a poper calendar table and a relationship between the calendar table and sales, you caan use a measure like this. See a picture below how it appears - you may need to put a year filter.
For the complete pattern, see this article:
https://www.daxpatterns.com/cumulative-total/
Cumulative Sales 1 =
IF (MIN ( 'Date Table'[Date] )
<= CALCULATE ( MAX ( Sales[Dates] ), ALL ( Sales ) ),
CALCULATE (
SUM ( 'Sales'[Sales Amount] ),
FILTER (
ALL('Date Table'[Date]),
'Date Table'[Date]<= MAX('Date Table'[Date]))
)
)
- thephotobus4 years agoFrequent Visitor
- sanimesa - you really helped me with this post. Thank you! Your method worked even when I couldn't get the method from DAXPatterns to do what I needed.