cancel
Showing results for 
Search instead for 
Did you mean: 
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
diogoblunck
Resolver I
Resolver I

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
diogoblunck
Resolver I
Resolver I

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors