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
Kevin-Mann
Frequent Visitor

RELATED() function removes filters and returns aggregate

 I have a DirectQuery model with the below relationship:

 

Allocations 1--* Positions 1--* Exposures

 

I have a filter on the Allocations table that gives me an allocation for associated positions by child company.  When I use the RELATED() function, it clears the filter on the Allocations table and returns the sum of all companies with allocations in the child company.  Is there a work-around for this to tell DAX, "I filtered the table for a reason, so please use my filters!"?

 

Thanks in advance!

 

KM

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi Kevin-Mann,

 

How about not use RELATED() function?If still can't achieve what you want , I would recommend you to merge your tables or use DAX function like SUMMARIZEor SUMMARIZECOLUMNS .

 

Regards,

Jimmy Tao

Jimmy,

 

Thanks for writing back.  Using SUMMARIZE is counter-intuitive, clunky, and is exponentially slower.  I also get an error that there are more than 1M rows, when I expand the date range.  Can I somehow use RELATED in the context of ALLSELECTED?

 

Kind Regards,

Kevin

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.