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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Palan22
Frequent Visitor

Calculate Sum of Values Based on Date and Product Type for filtering

Hello,

 

I need some guidance, I currently have a data table visual that is pulling the following information where the ‘Change’ calculated column = Sum of the current 'Received' value + any <= previous post date 'Received'values. Now, my issue here is that when I filter by ‘project type’ (using page filter), the ‘Change’ values are accounting for any previous post-date values regardless of the project type. How do I set it up to only calculate the Sum of all ‘Received’ units + any ‘Received’ units with the same project type that have a post-date that is =< than the current row’s post-date?

 

To give additional details about my setup, I have 3 data tables: ProjectID, Goals, and Services. The data table ProjectID has a relationship with both the goals and service tables based on the data [ProjectID] that is linking them all together. 

1 ACCEPTED SOLUTION

@Anonymous Hi! Thank you for reaching out to assist. I was able to figure it out by using the following:

Calculate(SUM(Services[Received]),Filter(All(Services[PostDate]),Services[PostDate] <= MAX(Services[PostDate])),Filter(All(Services[Status]),Services[Status] = "Completed"))

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Palan22 

Could you provide me a sample without sensitive data by your Onedrive for Business?

And show me your calculate logic to me.

It is better to show me a screenshot of the result you want.

This will make it easier for me to understand your requirement.

 

Best Regards,

Rico Zhou

@Anonymous Hi! Thank you for reaching out to assist. I was able to figure it out by using the following:

Calculate(SUM(Services[Received]),Filter(All(Services[PostDate]),Services[PostDate] <= MAX(Services[PostDate])),Filter(All(Services[Status]),Services[Status] = "Completed"))
parry2k
Super User
Super User

@Palan22 Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors