Forum Discussion
sabd80
3 years agoHelper IV
Running 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
3 years agoResolver III
You 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
3 years agoHelper IV
grandtotal , 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
- grandtotal3 years agoResolver III
can you post the definiton of [Quantity Shipped]?
- sabd803 years agoHelper IVQuantity Shipped = SUM('Sales Order Details'[Unit Quantity Shipped])