Forum Discussion
sabd80
Helper IV
3 years agoRunning Total Per Month
Hi, I want to get running total per day and month, most of the measures have filter on date like below: filter(all('Date'),'Date'[date] <=max('Date'[date]) but when I do that the running tot...
- 3 years ago
I found this below dax somewherelse and it is doing what it should:
Testing Qty Shipped RT =CALCULATE([Quantity Shipped],FILTER(ALLSELECTED('Calendar - Requested Date'), 'Calendar - Requested Date'[Calendar Date]<= max('Calendar - Requested Date'[Calendar Date]))Thanks for everyone's help.)
Ashish_Mathur
Super User
3 years agoHi,
Follow this process
1. Create a Calendar Table with calculated column formulas for Year, Month name and Month number
2. Sort the Month name column by the Month number
3. Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table
4. To your visual, drag Year, Month name and Date from the Calendar Table
5. Write these measures
Quantity Shipped = SUM('Sales Order Details'[Unit Quantity Shipped])Quantity shipped YTD = calculate([quantity shipped],datesytd(calendar[date],"31/12"))
Hope this helps.
- sabd803 years ago
Helper IV
Ashish_Mathur , thanks for your reply, I don't want YTD, I just need cummulative of the dates in the visuals.
- Ashish_Mathur3 years ago
Super User
Hi,
See if this measure works
Quantity shipped YTD = calculate([quantity shipped],datesbetween(calendar[date],minx(allselected(),Calendar[Date]),max(calendar[date])))- sabd803 years ago
Helper IV
there is something wrong with syntax inside minx.