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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
rvankralingen
New Member

Finding mutual values for two columns visualized in a table

Dear,

 

I just started with PowerBI after an exstensive period making use of MS Excel.

I am currently making a dashboard from logistic perspective for my company. 

My aim is to create a visual which shows mutual destinations and origins per carrier for respectively export and import incl. count of shipments.

It must look like below.

 

Example:

 

If value in Column Destination and Column Origin is equal then this mutual value must be displayed as in below table incl. count of shipment numbers for Destination (Export) and Origin (Import). 

 

Carrier X

Shared destination/originExportImport

USA (mutual destination & origin)

10050
Mexico (mutual destination & origin)4010
France (mutual destination & origin)205

 

How do I need to arrange/model my data in order to achieve this? (helping columns, formulas)

 

Thank you in advance for the responses.

 

KR Robert

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Not clear with your question.  Share the input and the output table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I have simulated this situation in MS Excel making use of Input and Ouput table below. 

Input table: is a pivot table

Output table: normal table

 

In Excel I created a formula which seeks mutual countries with following formula:
=IFERROR(UNIQUE(FILTER([ImportColumnTable1];ISNUMBER(XLOOKUP([ImportColumnTable1];ExportColumnTable1];0))));"")

 

This formula results in table below:

 

Mutual
Mexico
India
Malaysia

 

With a vlookup I search the corresponding count of shipments from Pivot table which results in Output table.

 

Input table (Pivot table)

ImportCount of shipmentsExportCount of shipments
China27United states8
Turkey13Mexico6
Mexico4Venezuela3
India3Congo (Kinshasa)1
South Korea3Oman1
Malaysia2India1
Morocco2Canada1
Chile1Malaysia1
Thailand1  

 

Output table (normal table)

MutualIMEX
Mexico46
India31
Malaysia21

Hi,

So you wish to create a 3 column table with only those countries showing which are present in the Import and Export columns.  If my understaning is correct, then share the actual data (not the Pivot Table).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-jingzhang
Community Support
Community Support

Hi @rvankralingen 

 

Can you share some sample data in table format to show what you have in the original table? How do you count the numbers for Destination (Export) and Origin (Import) based on that table? I guess probably there are Destination and Origin columns in the table, but I don't know how to get the count you want with only these two columns. There must be some other columns and logics to help the calculation.  

 

Best Regards,
Community Support Team _ Jing

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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