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
sgsukumaran
Resolver II
Resolver II

Weighted/Rolling Sum based on Attribute

I am trying to calculate a rolling/weighted sum of revenue. Here is my scenario. I have pivoted Cost by order Number and material number. whenever the Same material is used between orders then it should sum up the cost by material. In this scenario 555+ 900 and so on. The sum should happen only when they have material in common. 

 

weighted.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @sgsukumaran,

 

You need to create a Measure including the functions ISFILTERED and HASONEFILTER

That way you tell to you measure if the Actual $'s is opened in any way to behave in a way, if not to just do the running total.

 

Below is the Basic Running total, just need to update with your filters.

 

CALCULATE(
	[Actual $'s];
	FILTER(
		ALLSELECTED(your table[Row Labels]);
		ISONORAFTER(your table[Row Labels]; MAX(your table[Row Labels]); DESC)
	)
)

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hello @sgsukumaran,

 

You need to create a Measure including the functions ISFILTERED and HASONEFILTER

That way you tell to you measure if the Actual $'s is opened in any way to behave in a way, if not to just do the running total.

 

Below is the Basic Running total, just need to update with your filters.

 

CALCULATE(
	[Actual $'s];
	FILTER(
		ALLSELECTED(your table[Row Labels]);
		ISONORAFTER(your table[Row Labels]; MAX(your table[Row Labels]); DESC)
	)
)

 

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.