I'm trying to understand of the following measure: (30 Day Running Total).
1. I would say there are 2 row contexts: Total sales has row context because of the previously used formula SUMX, and FILTER generates a row context.
2. How does the FILTER, ALL and MAX logic work?
Your help is much appreciated
30 Day Running Total =
CALCULATE( [Total Sales];
FILTER( ALL( Dates );
Dates[Date] > MAX( Dates[Date] ) - 30 &&
Dates[Date] <= MAX( Dates[Date] ) ) )
Total Sales was calculated with measure:
Total Sales = SUMX( Sales; Sales[Quantity] * RELATED( Products[Current Price] ) )
Here are some blogs for your reference:
Filter context in DAX
ALL DAX function
Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.
Register by September 5 to save $200
Check out what's new in the Power BI Community!
Continue your learning in our online communities.