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
mmyers2
Advocate I
Advocate I

All() Causing Relationship Issue

I searched as much I could, and I could not find anyone with this same issue, so, if it has already been posted, I appologize. 

 

When I use ALL() in a measure, it causes the related data to repeat.

 

In the data, I have ID_DIVISION in a fact table, that is related to DC ID in a dimension table. The relationships are setup as many to one, with a single direction filter. 

 

Relationship.jpg

 

When I create the below measure, everything lines up (left table in screenshot below)

 

Measure = CALCULATE(sum('F_Warehouse Trace LPH Lines'[Lines]))
But when I add ALL(), it is almost like it looses the relationship, and DC ID repeats over and over again (right table in screenshot below)
 
CALCULATE(sum('F_Warehouse Trace LPH Lines'[Lines]),all('F_Warehouse Trace LPH Lines'))
What am I missing, or doing wrong? All I am trying to do is get the total to show for all selected (I need the total to be dynamic based on the selected records.. I have tried ALLSELECTED, SUMX(ALL()), and almost every variation I could think of, but I must be missing something.

 

All Issue.jpg

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

@mmyers2 ,

 

To be general, you may modify your measure using DAX like pattern below:

Measure =
CALCULATE (
    SUM ( 'F_Warehouse Trace LPH Lines'[Lines] ),
    ALLSELECTED ( 'D_Organization' )
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuta-msft 

 

Sorry, but that did not work. This is really driving me nuts since I want to use DC ID as a drill through, and also have other metrics on the same report page that crossfilter on DC ID.

 

The way this is interacting seems very odd to me.

 

Allselected.jpg

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.