Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!!!
| Truck | KT | Product | Load_Port | LoadCountry | LoadSubregion | LoadRegion | LoadDate | Discharge_Port | DischargeCountry | DischargeSubregion | DischargeRegion | DischargeDate |
| Truck1 | 8 | Water | Vasiliko | Cyprus | Med | Med | 26-Jul-24 | Burgas | Bulgaria | Med | Med | 09-Aug-24 |
| Truck2 | 8 | Petrol | Eleusis | Greece | Med | Med | 30-Jul-24 | Exxon Antwerp | Belgium | NW Europe | NW Europe | 13-Aug-24 |
| Truck3 | 8 | Diesel | Augusta | Italy | Med | Med | 08-Aug-24 | Santa Panagia | Italy | Med | Med | 22-Aug-24 |
| Truck4 | 10 | Water | Ust Luga | Russian Federation | Baltics | FSU+Russia | 10-Aug-24 | Marsaxlokk | Malta | Med | Med | 24-Aug-24 |
| Truck5 | 5 | Petrol | Ust Luga | Russian Federation | Baltics | FSU+Russia | 17-Aug-24 | Ust Luga | Russian Federation | Baltics | FSU+Russia | 31-Aug-24 |
| Truck6 | 6 | Diesel | Arkhangelsk | Russian Federation | Other FSU+Russia | FSU+Russia | 26-Aug-24 | Unknown-Med | Unknown | Med | Med | 09-Sep-24 |
| Truck7 | 17 | Water | Dortyol | Republic of Turkiye | Med | Med | 03-Sep-24 | Rotterdam | Netherlands | NW Europe | NW Europe | 17-Sep-24 |
| Truck8 | 8 | Petrol | Unknown-Spain | Spain | Med | Med | 09-Sep-24 | Unknown-US PADD 1 | United States of America | US PADD 1 | United States Region | 23-Sep-24 |
| Truck9 | 10 | Diesel | Exxon Antwerp | Belgium | NW Europe | NW Europe | 10-Sep-24 | New York | United States of America | US PADD 1 | United States Region | 24-Sep-24 |
| Truck10 | 8 | Water | Burgas | Bulgaria | Med | Med | 12-Sep-24 | Vasiliko | Cyprus | Med | Med | 26-Sep-24 |
| Truck11 | 10 | Petrol | Exxon Antwerp | Belgium | NW Europe | NW Europe | 14-Sep-24 | Eleusis | Greece | Med | Med | 28-Sep-24 |
| Truck12 | 7 | Diesel | Santa Panagia | Italy | Med | Med | 15-Sep-24 | Augusta | Italy | Med | Med | 29-Sep-24 |
Solved! Go to Solution.
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
Proud to be a Super User! | |
Date tables help! Learn more
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
Proud to be a Super User! | |
Date tables help! Learn more
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |