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
MaximeGinini
New Member

Slicer on active and inactive relation

Hello,

I have a table "CJI3" containing informations about valued time spent by employees.
It has several data but the ones I am focusing on right now is "cost center origin", "cost center responsible", "project", "euros".
I have another table wich is a table for regrouping cost centers into services, so it includes "cost center" "services".
So, "cost center origin" and "cost center responsible" are both linked to "cost center" in my data model, but obviously one is inactive which is "origin" in this case.

How this data work: an employee is attached to a cost center, and can work on multiple projects which are also attached to cost centers.
So, either the employee from cost center A works in a project attached to his department A, and then we both have A in origin and responsible.
But if for some reason, he works for a project attached to another department B, then responsible is B and origin is A.
Origin is the cost center attached to the employee
Responsible is the cost center attached to the project
For cost center A, I need to analyse what has been worked from A guys to other departments B, C etc, minus what has been worked on department A from guys on department B, C etc.


What I am trying to do is:
- create a slicer "services" => Done

- create a table of projects with two measure: time sent, time received

 

MaximeGinini_0-1729246731278.png

 


My problem:
If I select any service in my slicer, the table CJI3 will be filtered by the active relation, selecting only the responsible cost centers.
I only got projects from responsible departments then, but not the projects the service could have been working on and for which it isn't responsible.
I figured how to diplay the right data though, I can get the 150 and 825 displayed easily, but when I put some detail it doesnt work anymore.

MaximeGinini_1-1729247134319.png

In red: 1018 + 791 = 1809 time sent
In yellow: 754 + 409 = 1163 time received

MaximeGinini_2-1729247210899.png

 

MaximeGinini_3-1729247252942.png

 

Many thanks for your help and hope I have been clear enough, otherwise I will answer any question you may have, and hope my english is good enough for you to understand

 


Raw data if you wanna try with this sample

    BY LINKS   
CC ResponsibleCC OriginProjectEuroService ResponsibleService Origine CCService
A0010A0010A230DEVDEV A0010DEV
A0010A0020A500DEVCORP A0020CORP
A0010A0030B325DEVAOS A0030AOS
A0020A0020C100CORPCORP   
A0020A0010C150CORPDEV   
         
         
 SLICER SELECTION = DEV       
         
What I want to see        
         
ProjectsTime sentTime receivedDiff     
A 500500     
B 325325     
C150 -150     
total150825675     
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MaximeGinini , hello jordandouglas, thank you for your prompt reply!

Please use the following measures to meet your requirements:

TimeSent = 
CALCULATE (
    SUM(CJI3[Euro]),
    USERELATIONSHIP('CJI3'[CC Origin], 'Cost Center'[Cost Center]),  
    CJI3[Service Origin] = SELECTEDVALUE('Cost Center'[Service]),  
    CJI3[Service Responsible] <> SELECTEDVALUE('Cost Center'[Service])  
)

 


TimeReceived = 
CALCULATE (
    SUM(CJI3[Euro]),
    CJI3[Service Responsible] = SELECTEDVALUE('Cost Center'[Service]),  
    CJI3[Service Origin] <> SELECTEDVALUE('Cost Center'[Service]) 
)
Difference = [TimeReceived] - [TimeSent]

Result:

vyajiewanmsft_0-1729760128287.png

Best regards,

Joyce

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

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @MaximeGinini , hello jordandouglas, thank you for your prompt reply!

Please use the following measures to meet your requirements:

TimeSent = 
CALCULATE (
    SUM(CJI3[Euro]),
    USERELATIONSHIP('CJI3'[CC Origin], 'Cost Center'[Cost Center]),  
    CJI3[Service Origin] = SELECTEDVALUE('Cost Center'[Service]),  
    CJI3[Service Responsible] <> SELECTEDVALUE('Cost Center'[Service])  
)

 


TimeReceived = 
CALCULATE (
    SUM(CJI3[Euro]),
    CJI3[Service Responsible] = SELECTEDVALUE('Cost Center'[Service]),  
    CJI3[Service Origin] <> SELECTEDVALUE('Cost Center'[Service]) 
)
Difference = [TimeReceived] - [TimeSent]

Result:

vyajiewanmsft_0-1729760128287.png

Best regards,

Joyce

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

 

 

jordandouglas
New Member

If you would like to slice on either service responsible or service origin using only one slicer then this has been achieved before.

https://community.fabric.microsoft.com/t5/Desktop/Single-Slicer-to-Filter-Multiple-Columns/m-p/34232...

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