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
Anonymous
Not applicable

USERALATIONSHIP and slicer selection

Hello 

 

I would appreciate any help on the following:

 

My model has an active relationship between "Cost Center #" and "Employee Cost Center" and an inactive one between "Cost Center #" and " Costed Cost Center" fields

I have a Cost center slicer that I was hoping will be working in both scenarios : when I need to see the total cost for a cost center it might contain costs coded by employees from various other cost centers. 

Gaechka_0-1695164701831.png

Gaechka_1-1695164714539.png

 

 

So far for that scenario I am only getting the number coded by employees of selected in the slicer cost center :

Total Cost Costed CC FTE = CALCULATE([Total Cost], USERELATIONSHIP(Tech_Projects[Costed Cost Center],'Tech Div Cost Centers'[Cost Center #]),FILTER(Tech_Projects,Tech_Projects[DR a/c Description]="Payroll Cost Allocation"))

Gaechka_2-1695164795065.png

when in relaity it should be the following : 

Total Cost Costed CC FTE = CALCULATE([Total Cost], Tech_Projects,Tech_Projects[Costed Cost Center]="2212",FILTER(Tech_Projects,Tech_Projects[DR a/c Description]="Payroll Cost Allocation"))

Gaechka_3-1695164834063.png

The number is smaller, as there were some transfers out of cost center, but 192K is what I expect.

It seems as if userelationship isn't responding when cost center on the filter is selected.

 

Thank you 

 

 

3 REPLIES 3
Anonymous
Not applicable

Thank you, I've changed my model and now everything is working fine .

 

 

Anonymous
Not applicable

 Hi @amitchandak

 

Thank you for trying, unfortunately no change 😞

amitchandak
Super User
Super User

@Anonymous , Try with this small change

 

CALCULATE(CALCULATE([Total Cost], USERELATIONSHIP(Tech_Projects[Costed Cost Center],'Tech Div Cost Centers'[Cost Center #])),FILTER(Tech_Projects,Tech_Projects[DR a/c Description]="Payroll Cost Allocation"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
Top Kudoed Authors