Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
amirabedhiafi
Impactful Individual
Impactful Individual

Get the list of sending and receiving agents in two separated filters

 I have a fact table and a dimension in my model in Power BI :

 

ShipmentID SendingAgentCode ReceivingAgentCode

1000            12                            13

1001            14                            15

 

My model is like below : 

amirabedhiafi_0-1616773579937.png

I want to have two filters one for Receiving Agents and one for Sending Agents. How can I achieve that?

Also, I want to calculate the number of shipments for Receiving/Sending Agents separetly.

 

This is what I tried : 

SendingAgent = LOOKUPVALUE(Agent[AgentCode],Agent[AgentName],Summarize(Shipment,Shipment[SendingAgentCode]))
Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini
1 ACCEPTED SOLUTION
amirabedhiafi
Impactful Individual
Impactful Individual

I ended up creating a separate table :

DimSendingAgent = ALL (DimAgent)

And then created the missing relationship to this new table. This is a common practice for relatively small tables using Power BI.

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini

View solution in original post

3 REPLIES 3
amirabedhiafi
Impactful Individual
Impactful Individual

I ended up creating a separate table :

DimSendingAgent = ALL (DimAgent)

And then created the missing relationship to this new table. This is a common practice for relatively small tables using Power BI.

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini
Jihwan_Kim
Super User
Super User

Hi, @amirabedhiafi 

Please correct me if I wrongly understand your question.

In my opinion, please try to create two relationship lines inactive.

And when you create measures, you can use userelationship function in your measure to calculate per SendingAgent or per ReceivingAgent.

 

If it is OK with you, please share the sample pbix file, then I can look into it to come up with a more accurate solution.

 

Thank you.

 

Jihwan Kim

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


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

I already created two inactive relationships. I can't share the pbix file since it is containing sensitive data.

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.