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.)
grandtotal
Resolver III
3 years agoYou should use the concept described here by SQLBI:
https://www.sqlbi.com/articles/computing-running-totals-in-dax/
Sales RT :=
VAR MaxDate = MAX ( 'Date'[Date] ) -- Saves the last visible date
RETURN
CALCULATE (
[Sales Amount], -- Computes sales amount
'Date'[Date] <= MaxDate, -- Where date is before the last visible date
ALL ( Date ) -- Removes any other filters from Date
)
I hope this will help you!
sabd80
Helper IV
3 years agograndtotal , I have tried that, it does not work for daily and monthly.
Testing Qty Shipped RT Month2 =
VAR SelectedDate = max('Calendar - Requested Date'[Calendar Date])
VAR QtyShippedRT=
CALCULATE([Quantity Shipped],
'Calendar - Requested Date'[Calendar Date]<= max('Calendar - Requested Date'[Calendar Date]), ALL('Calendar - Requested Date')
)
return
QtyShippedRT