Forum Discussion

DJSwezey's avatar
DJSwezey
Helper I
3 years ago

Sort Order ignores measure??

I have a simple 'Sales' table below. I created a running total measure to compile the [Goal] amounts each week.

When I have the [Week of] sorted by default to [Week of] my measure works fine and the Goals are combined each week over week. When I sort [Week of] by [Order id] then the measure only sums each week individually in the measure. Any idea why this would be happening? 

 

Goal Running Total = CALCULATE(
    sum(Sales[Goal]),
    FILTER(
        all(Sales[Week Of]),
        Sales[Week Of] <= MAX(Sales[Week Of])
    )
)

 

 

(Sorted by [Week of])

 

(Sorted by [Order id])

 

 

 

1 Reply