Forum Discussion
Running total based on time
- 5 years ago
Hi Anonymous ,
Are the date and item number column from the same table?
Do you mean creating the slicer like this?
If yes, you can try this measure.
RT = VAR thistime = MIN ( 'Table'[Time] ) RETURN CALCULATE ( SUM ( 'Table'[value] ), FILTER( ALLSELECTED ( 'Table' ), 'Table'[Time] <= thistime ))If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Not sure you mean with your sort order column but this measure expression should give you your running total based on time column.
RT =
VAR thistime =
MIN ( Table[TimeColumn] )
RETURN
CALCULATE (
SUM ( Table[ValueColumn] ),
ALLSELECTED ( Table[TimeColumn] ),
Table[TimeColumn] <= thistime
)
Replace the table and column names with the actual ones in your model. Use the measure in a visual with the Time column.
Regards,
Pat