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
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]))

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]))

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.

Top Solution Authors