Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a requirement wherein I need to plot the cumulative sales against date for each month in line chart. Here month will be selected in slicer (e.g November 2024).
Sample Data is given below.
| Date | Sales |
| 1-Oct-24 | 1 |
| 2-Oct-24 | 2 |
| 3-Oct-24 | 0 |
| 4-Oct-24 | 0 |
| 5-Oct-24 | 4 |
| 6-Oct-24 | 0 |
| 7-Oct-24 | 5 |
| 1-Nov-24 | 10 |
| 2-Nov-24 | 0 |
| 3-Nov-24 | 12 |
| 4-Nov-24 | 0 |
| 5-Nov-24 | 5 |
| 6-Nov-24 | 0 |
| 7-Nov-24 | 7 |
If we select the period in slicer as November 20204, the graph shouls how below data.
1st Nov - 10
2nd Nov - 10
3rd Nov - 22
4th Nov - 22
5th Nov - 27
6th Nov - 27
7th Nov - 34
and till November 30 it should show as 34th. Suppose if a sale of 5 happens on November 29th, then it should show the cumulative sale as 39 on November 29th and show the same till end of the month.
I have written the below DAX to find the cumulative sales.
Thanks in advance,
Nikhil
Solved! Go to Solution.
You can use
Total Sales = CALCULATE( SUM( SalesData[Sales] ), DATESMTD( 'Date'[Date] ) )
You can use
Total Sales = CALCULATE( SUM( SalesData[Sales] ), DATESMTD( 'Date'[Date] ) )
Thank you so much. It worked.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!