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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kannan4444
Helper I
Helper I

Export and Import

Hey Guys, 
i have below data and trying to achieve Export (based on load date) and Import (based on discharge date)

If i select one country, i need to show the Net exports as below.

 

Please HELP!!!

Kannan4444_0-1726581072781.png



Truck KT ProductLoad_PortLoadCountryLoadSubregionLoadRegionLoadDateDischarge_PortDischargeCountryDischargeSubregionDischargeRegionDischargeDate
Truck1                      8WaterVasilikoCyprusMedMed26-Jul-24BurgasBulgariaMedMed09-Aug-24
Truck2                      8PetrolEleusisGreeceMedMed30-Jul-24Exxon AntwerpBelgiumNW EuropeNW Europe13-Aug-24
Truck3                      8DieselAugustaItalyMedMed08-Aug-24Santa PanagiaItalyMedMed22-Aug-24
Truck4                    10WaterUst LugaRussian FederationBalticsFSU+Russia10-Aug-24MarsaxlokkMaltaMedMed24-Aug-24
Truck5                      5PetrolUst LugaRussian FederationBalticsFSU+Russia17-Aug-24Ust LugaRussian FederationBalticsFSU+Russia31-Aug-24
Truck6                      6DieselArkhangelskRussian FederationOther FSU+RussiaFSU+Russia26-Aug-24Unknown-MedUnknownMedMed09-Sep-24
Truck7                    17WaterDortyolRepublic of TurkiyeMedMed03-Sep-24RotterdamNetherlandsNW EuropeNW Europe17-Sep-24
Truck8                      8PetrolUnknown-SpainSpainMedMed09-Sep-24Unknown-US PADD 1United States of AmericaUS PADD 1United States Region23-Sep-24
Truck9                    10DieselExxon AntwerpBelgiumNW EuropeNW Europe10-Sep-24New YorkUnited States of AmericaUS PADD 1United States Region24-Sep-24
Truck10                      8WaterBurgasBulgariaMedMed12-Sep-24VasilikoCyprusMedMed26-Sep-24
Truck11                    10PetrolExxon AntwerpBelgiumNW EuropeNW Europe14-Sep-24EleusisGreeceMedMed28-Sep-24
Truck12                      7DieselSanta PanagiaItalyMedMed15-Sep-24AugustaItalyMedMed29-Sep-24
1 ACCEPTED SOLUTION
Joe_Barry
Super User
Super User

Hi @Kannan4444 

 

Create a date/calendar table, link in my bio.

 

Create an Active One to Many Relationship from the Date Table date column with the Load Date and do the same for the Discharge Date, but this will be an in-active relationship

 

Create a measure for LoadDate

KT Load Date = SUM('Table'[KT])

Then another for Discharge Date

KT Discharge Date = CALCULATE(SUM('Table'[KT]), USERELATIONSHIP('Date'[Date], 'Table'[Discharge Date])

 

When creating any visuals with date inforation, use the columns from the Date table and add the measures to the visuals to be able to compare.

 

Hope this helps

Joe




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

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn


Let's connect on LinkedIn


View solution in original post

1 REPLY 1
Joe_Barry
Super User
Super User

Hi @Kannan4444 

 

Create a date/calendar table, link in my bio.

 

Create an Active One to Many Relationship from the Date Table date column with the Load Date and do the same for the Discharge Date, but this will be an in-active relationship

 

Create a measure for LoadDate

KT Load Date = SUM('Table'[KT])

Then another for Discharge Date

KT Discharge Date = CALCULATE(SUM('Table'[KT]), USERELATIONSHIP('Date'[Date], 'Table'[Discharge Date])

 

When creating any visuals with date inforation, use the columns from the Date table and add the measures to the visuals to be able to compare.

 

Hope this helps

Joe




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

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn


Let's connect on LinkedIn


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.