Forum Discussion
Running sum
- 1 year ago
I think you can get this by just updating your visual calc like so:
Running sum = IF( NOT ISBLANK( [YTD] ), RUNNINGSUM([YTD]) )
Hi Julier,
Thank you for providing information on your issue. I’ve reviewed your scenario and successfully replicated it using sample data on my end.
I’m sharing the working .pbix file below so you can explore the setup and DAX logic more clearly. Please feel free to open it and review how the relationships and measures are configured:
I hope this helps resolve your issue. If you have any questions or need further clarification, I’m happy to help.
Thanks for being part of the Microsoft Community!
- Julier1 year ago
Helper III
Thank you for your reply unfortunately I need to be able to graph as below and as the data behind it has different sites attched to the sales I also need the graph to change when a slicer is selected, as you can see the chart flatlines at the last running total due to no sales from day 3 forward as yet, I want the current year line to grow as the month goes on
- SundarRaj1 year ago
Super User
Hi Julier , is this what you eyeing for? For achieving this, the code shall be as follows, thanks
Jul25 YTD =VAR YearToDate =CALCULATE([Jul25],DATESYTD('Calendar'[Date]))RETURNIF([Jul25],YearToDate,"")- Julier1 year ago
Helper III
Hello, Im not sure I'm explaining myself clearly, the data is in the format below and as I have used the running sum to plot the visual i need for it to not calculate a running sum for he remainder of the current month if there are no sales in the rest of the month as these will come in each day and then the line with continue to calaucate the running sum as the month goes on without flat lining
MonthYear DayInMonth Volume (SQM) Jul 24 1 11212 Jul 24 1 58307 Jul 25 1 2438 Jul 25 1 64838 Jul 25 1 23257 Jul 25 1 3297 Jul 25 1 4976 Jul 25 1 42634 Jun 25 2 22630 Jul 25 2 38497 Jul 24 2 19799 Jun 25 2 332 Jun 25 2 20040 Jun 25 2 13830 Jul 24 2 6576 Jun 25 3 8275 Jun 25 3 5833 Jun 25 3 9159 Jun 25 3 6084 Jun 25 3 7421 Jul-25 3 10980 Jul-25 3 26144 Jul-25 3 2789 Jun 25 3 13031 Jun 25 3 22700 Jun 25 3 9945 Jun 25 3 19630 Jun 24 5 13251 Jun 25 5 6904 Jun 25 5 11494 Jun 25 5 9022 Jun 25 5 5420 Jun 25 5 31514 Jun 25 5 13277 Jun 25 5 10149 Jun 24 5 3802 Jun 24 5 3948 Jun 24 5 7335 Jun 24 5 6082 Jun 24 5 7916 Jun 24 5 3360 Jul 24 5 2243 Jul 24 5 14733 Jul 24 5 5725 Jul 24 5 7459 Jul 24 5 7621 Jul 24 6 18677 Jul 24 6 6060 Jul 24 6 29212 Jul 24 6 8882 Jul 24 6 3469