Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Luukv93
Frequent Visitor

Need your help with a measure

Hello,

 

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] ) )

 

 

 

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @Luukv93,

 

Here are some blogs for your reference:

Filter context in DAX

ALL DAX function

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.