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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Lukasz_Lyszczak
Frequent Visitor

Aggregation in context

Dear Community,

 

I'm trying to solve the problem with agregation in context. Have looked throug lot of posts in forum, unfortunatel haven't found solution.

My data model includes 3 bases. Main AD with all categories (t_item). MPS and BOM are related (multiple to one) to AD (MPS_t_item --> AD_t_item and BOM_t_mitm --> AD_t_item). MPS contains als column with dates and qunatities (t_oqan) for all categories.

 

Lukasz_Lyszczak_0-1678354815614.png

 

I'm trying to sum all quantities divided by days or months for each subcategory (BOM_t_sitm).

I see that relation is working cause when I put into matrix category, subcategory and qty results are ok and changing according to chosen period of time.

 

Lukasz_Lyszczak_1-1678355064599.png

 

Unfortunately when I'm deleting main category from matrix, agregation is not working properly and for each subcategory I'm receiving total sum of qty for all categories.

 

Lukasz_Lyszczak_2-1678355100456.png

I was trying multiple mesures with difrent summing functions (found in this forum) unfortunately witho positive result.

 

Thanks for your help.

Regards, Łukasz

1 ACCEPTED SOLUTION
Lukasz_Lyszczak
Frequent Visitor

Update. Have found the solution:

 

Demand = CALCULATE(SUM(MPS[t_oqan]),FILTER(AD,AD[t_item] in DISTINCT(BOM[t_mitm])))

View solution in original post

1 REPLY 1
Lukasz_Lyszczak
Frequent Visitor

Update. Have found the solution:

 

Demand = CALCULATE(SUM(MPS[t_oqan]),FILTER(AD,AD[t_item] in DISTINCT(BOM[t_mitm])))

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors