0
votes

I have a table in PowerBI that has the column "Date" and "Sales". I want to create a measure and display it in a table that computes a rolling 7 day total of the "Sales" column. To be clear, I want to see this overtime, I do not want it for a single day, I want to create a table exactly like I am showing below, thanks!

Example of Running Total

1

1 Answers

0
votes

Rolling total can be make using the quick measure feature underneath the New Measure & New Column buttons in the Home Tab.

Select Calculation -> Rolling Total in the Totals Section

Example

If not then you can make a formula (Both for Measures):

Rolling Total  = 
CALCULATE(
    SUM('Sheet1'[Sales]),
    FILTER(
        ALLSELECTED('Sheet1'[Date]),
        ISONORAFTER('Sheet1'[Date], MAX('Sheet1'[Date]), DESC)
    )
)


Rolling Total 2 = 
CALCULATE(
    SUM(Sheet1[Sales]), 
    DATESMTD(
        Sheet1[Date])
)