cancel
Showing results for 
Search instead for 
Did you mean: 
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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.