cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sgsukumaran Member
Member

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

Accepted Solutions
diogoblunck Regular Visitor
Regular Visitor

Re: Weighted/Rolling Sum based on Attribute

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 Regular Visitor
Regular Visitor

Re: Weighted/Rolling Sum based on Attribute

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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 284 members 2,942 guests
Please welcome our newest community members: