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, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Calculate Direct & Undirect Amount

Hello Experts, 
I want to calculate 2 measures for Direct & undirect Amount using data attached to show this value in table chart to each country whats the direct and indirect;
- Direct: Country of Origin and Country of Import are the same,
- Indirect: Country of Origin is NOT equal Country of Import. 
For Example using UAE Country:   - Direct: Country of Origin & Country of Import = UAE

                                                       -Indirect: Country of Origin = UAE, Country of Import <> UAE
UAE is an example, but I want to show all country of imports in a table chart to see the direct and indirect for each country.
Thanls in Advamced.

Country of Origin Country  of Import CommodityPoint of EntryAmount 
ChinaChinaMultiple LoudspeakersSarfayt Land Border34
ChinaUAENatural Gas, LiquefiedSOHAR (SEA PORT)3445
UAEUAEBall BearingsAl Wajajah Land Border5676
ChinaChinaElectric DoorbellsCustoms HQ6768
ChinaUAETableware Or KitchenwareHAFEET (BORDER  POST)342
UAEKSAParts Of Gas Turbines, N.E.S.Sarfayt Land Border132
ChinaUAEMultiple LoudspeakersKHATMAT MILAHA (BORDER  POST)323
TurkeyUAESkulcaps (Taqias)Al Darah234
ChinaRussiaAudio-Frequency Electric AmplifiersAl Wajajah Land Border4545
ChinaIndiaDress PatternsSUWEIQ (SEA PORT)76
TurkeyTurkeyInductors, N.E.SAL DUQM (SEA PORT)545
KSAOmanMotors Of An Output <= 37,5 WSARFAIT (BORDER POST)386
KSAKSAMultiple LoudspeakersCENTRAL POST OFFICE217
KSAJapanElectric DoorbellsSalalah International Airport Passenger463
KSAKSANatural Gas, LiquefiedDIBA PORT (BORDER POST)288
KSAIndiaFuel oils For shipsAl Darah360
USAUSAFrozen Cuttle fish and squidDIRECTORATE GENERA128
USABrazilDress PatternsSarfayt Land Border190
USACanadaAudio-Frequency Electric AmplifiersARKAN SOHAR LOGISTICS LLC NORTH354
USAUSASweet Biscuits  HAFEET (BORDER  POST)300
USAUSAHair Lacquers  ARKAN SOHAR LOGISTICS LLC NORTH142
USAEgyptHousehold Ware Of ZincDIBA PORT (BORDER POST)188
USAIraqSweet Biscuits  Sarfayt Land Border149
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You can try two measures like

 

Direct =Calculate(Sum(Table[Amount]), filter(Table, Table[Country of Origin] = Table[Country of Import]))

 

 

In Direct = Calculate(Sum(Table[Amount]), filter(Table, Table[Country of Origin] <> Table[Country of Import]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You can try two measures like

 

Direct =Calculate(Sum(Table[Amount]), filter(Table, Table[Country of Origin] = Table[Country of Import]))

 

 

In Direct = Calculate(Sum(Table[Amount]), filter(Table, Table[Country of Origin] <> Table[Country of Import]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors