Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a set of shipment charges by shipment that I need to aggregate to get the shipment's total revenue or by revenue component
Here is an example:
Shipment_Nbr | Revenue Type | Revenue | Weight |
1602530 | Fuel | 90 | 122.3 |
1602530 | Misc | 82 | 122.3 |
1602530 | Documents | 68 | 122.3 |
1602530 | Handling | 66 | 122.3 |
1602530 | Freight | 89 | 122.3 |
1997544 | Fuel | 98 | 87.6 |
1997544 | Misc | 56 | 87.6 |
1997544 | Documents | 85 | 87.6 |
1997544 | Handling | 94 | 87.6 |
1997544 | Freight | 67 | 87.6 |
1226866 | Fuel | 82 | 754.3 |
1226866 | Misc | 87 | 754.3 |
1226866 | Documents | 76 | 754.3 |
1226866 | Handling | 90 | 754.3 |
1226866 | Freight | 74 | 754.3 |
In the table, the Shipment Number is the unique identifier. Each shipment has multiple types of charges and I want to show dynamically, what each shipment per weight breakdown is by all or some of the charge types.
The kicker is that the weights are duplicated by shipment.
Here is how Ideally I could show a visual of the data:
All charge types selected:
Shipment_Nbr | Total Revenue | Weight | Revenue by Weight |
1602530 | $395.00 | 122.3 | $3.23 |
1997544 | $400.00 | 87.6 | $4.57 |
1226866 | $409.00 | 754.3 | $0.54 |
However, if in the slicer, I select only Freight, I should see this:
Shipment_Nbr | Total Revenue | Weight | Revenue by Weight |
1602530 | $89.00 | 122.3 | $3.23 |
1997544 | $67.00 | 87.6 | $4.57 |
1226866 | $74.00 | 754.3 | $0.54 |
Solved! Go to Solution.
@SMG
Here are the three measures:
Total Revenue = SUM( Table16[Revenue] )
S_Weight = MAX( Table16[Weight] )
Revenue by Weigh =
DIVIDE(
CALCULATE(
[Total Revenue],
REMOVEFILTERS( Table16[Revenue Type] )
),
CALCULATE([S_Weight])
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@SMG
Here are the three measures:
Total Revenue = SUM( Table16[Revenue] )
S_Weight = MAX( Table16[Weight] )
Revenue by Weigh =
DIVIDE(
CALCULATE(
[Total Revenue],
REMOVEFILTERS( Table16[Revenue Type] )
),
CALCULATE([S_Weight])
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
116 | |
82 | |
47 | |
42 | |
32 |
User | Count |
---|---|
186 | |
80 | |
72 | |
48 | |
45 |