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
inescosta
Advocate II
Advocate II

slicer distant relationship

Hello,

 

I have a measure that is summing up values in table PROJETOSEGMENTO, and I want to use a slicer so that my measures sums by department.

 

But the relationship between the two tables isn't direct at all.

 

Can somesone help me ? can I use userelationship is some way??

 

Thank you,

 

Ines

 

I imagem.png

 

4 REPLIES 4
v-sihou-msft
Employee
Employee

@inescosta

 

If you want to use a slicer which can slice the PROJETOSEGMENTO measure with Department, you must have active relationship between these tables. It must have a path from Department to PROJETOSEGMENTO.

 

If you just need to slice the measure in DAX, you can use USERELATIONSHIP() to use inactive relationship for your calculation.

 

Regards,

 

 

Yes, I am using a DAX expression, my problem with USERELATIONSHIP is that I have a series of relationships I need it to consider, so should I use:

USERELATIONSHIP(Department[code];Servprod[codigodepartament];servprod[id];tipoprojeto[servprod_id])

USERELATIONSHIP(Department[code];Servprod[codigodepartament]); USERELATIONSHIP(;servprod[id];tipoprojeto[servprod_id])

ETC....

Hi @inescosta,

 

Why don't you add a colum in the tiposProjecto with the Department using the Lookupvalue formula?

 

Looking at you print I cannot determine how the model is set up and give you a example what it can be done but maybe you can try doing it with the lookupvalue, since from the TiposProjecto to the department you only have one inactive relationship.

 

Regards,

 

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@inescosta

 

You can only specify two columns to use the inactive relationship between them.

 

Regards,

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.