This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi All,
In need of some help, NEW to power BI (about 3 months now) and I am struggling to find the proper way to build a measure for a matrix I am trying to setup for Shipment Window. Essentially I have 2 different sources of shipments (FOB = Import / DOM = Domestic) and I want to roll up specific monthly $ values in 2023/2024 for each source by season (Spring = S24 and Fall = F24).
Essentially, I am looking to roll-up as per the below to get the shipment $ per season as follows:
S24 Measure: that would include all Shipments $ for DOM Source (DEC 2023 to MAY 2024) + Shipment $ for FOB Source from (NOV 2023 TO APR 2024)
F24 Measure: that would include all Shipments $ for DOM Source (JUN 2024 to NOV 2024) + Shipment $ for FOB Source from (MAY 2024 TO OCT 2024)
Any help would be appreciated.
Thank-you for your time,
Brandon
Solved! Go to Solution.
Hi @bbass82 ,
According to your description, you can use calulate+filter to filter the conditions and perform the calculations. For example
S24 Measure =
CALCULATE(
SUM('Shipments'[Shipment $]),
(
('Shipments'[Source] = "DOM" && 'Shipments'[Date] >= DATE(2023, 12, 1) && 'Shipments'[Date] <= DATE(2024, 5, 31)) ||
('Shipments'[Source] = "FOB" && 'Shipments'[Date] >= DATE(2023, 11, 1) && 'Shipments'[Date] <= DATE(2024, 4, 30))
)
)F24 Measure =
CALCULATE(
SUM('Shipments'[Shipment $]),
(
('Shipments'[Source] = "DOM" && 'Shipments'[Date] >= DATE(2024, 6, 1) && 'Shipments'[Date] <= DATE(2024, 11, 30)) ||
('Shipments'[Source] = "FOB" && 'Shipments'[Date] >= DATE(2024, 5, 1) && 'Shipments'[Date] <= DATE(2024, 10, 31))
)
)
Hopefully, the above logic can help you, and if you have any other questions, as lbendlin said, you can provide the complete sample data so that we can help you faster. Please hide sensitive information in advance.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Create the Measures
S24 Measure =
VAR DOM_S24 =
CALCULATE(
SUM('Shipments'[Shipment $]),
'Shipments'[Source] = "DOM",
'Shipments'[Shipment Date] >= DATE(2023, 12, 1),
'Shipments'[Shipment Date] <= DATE(2024, 5, 31)
)
VAR FOB_S24 =
CALCULATE(
SUM('Shipments'[Shipment $]),
'Shipments'[Source] = "FOB",
'Shipments'[Shipment Date] >= DATE(2023, 11, 1),
'Shipments'[Shipment Date] <= DATE(2024, 4, 30)
)
RETURN
DOM_S24 + FOB_S24
F24 Measure =
VAR DOM_F24 =
CALCULATE(
SUM('Shipments'[Shipment $]),
'Shipments'[Source] = "DOM",
'Shipments'[Shipment Date] >= DATE(2024, 6, 1),
'Shipments'[Shipment Date] <= DATE(2024, 11, 30)
)
VAR FOB_F24 =
CALCULATE(
SUM('Shipments'[Shipment $]),
'Shipments'[Source] = "FOB",
'Shipments'[Shipment Date] >= DATE(2024, 5, 1),
'Shipments'[Shipment Date] <= DATE(2024, 10, 31)
)
RETURN
DOM_F24 + FOB_F24
Add the measures S24 Measure and F24 Measure to your visuals to see the seasonal roll-up values.
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Create the Measures
S24 Measure =
VAR DOM_S24 =
CALCULATE(
SUM('Shipments'[Shipment $]),
'Shipments'[Source] = "DOM",
'Shipments'[Shipment Date] >= DATE(2023, 12, 1),
'Shipments'[Shipment Date] <= DATE(2024, 5, 31)
)
VAR FOB_S24 =
CALCULATE(
SUM('Shipments'[Shipment $]),
'Shipments'[Source] = "FOB",
'Shipments'[Shipment Date] >= DATE(2023, 11, 1),
'Shipments'[Shipment Date] <= DATE(2024, 4, 30)
)
RETURN
DOM_S24 + FOB_S24
F24 Measure =
VAR DOM_F24 =
CALCULATE(
SUM('Shipments'[Shipment $]),
'Shipments'[Source] = "DOM",
'Shipments'[Shipment Date] >= DATE(2024, 6, 1),
'Shipments'[Shipment Date] <= DATE(2024, 11, 30)
)
VAR FOB_F24 =
CALCULATE(
SUM('Shipments'[Shipment $]),
'Shipments'[Source] = "FOB",
'Shipments'[Shipment Date] >= DATE(2024, 5, 1),
'Shipments'[Shipment Date] <= DATE(2024, 10, 31)
)
RETURN
DOM_F24 + FOB_F24
Add the measures S24 Measure and F24 Measure to your visuals to see the seasonal roll-up values.
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Kedar! Thank-you so much for this DAX solution. It worked perfectly for what we wanted to build for our shipment rollup. Appreciate you more than words can say. All the best and look forward to your advice in the future.
Hi @bbass82 ,
According to your description, you can use calulate+filter to filter the conditions and perform the calculations. For example
S24 Measure =
CALCULATE(
SUM('Shipments'[Shipment $]),
(
('Shipments'[Source] = "DOM" && 'Shipments'[Date] >= DATE(2023, 12, 1) && 'Shipments'[Date] <= DATE(2024, 5, 31)) ||
('Shipments'[Source] = "FOB" && 'Shipments'[Date] >= DATE(2023, 11, 1) && 'Shipments'[Date] <= DATE(2024, 4, 30))
)
)F24 Measure =
CALCULATE(
SUM('Shipments'[Shipment $]),
(
('Shipments'[Source] = "DOM" && 'Shipments'[Date] >= DATE(2024, 6, 1) && 'Shipments'[Date] <= DATE(2024, 11, 30)) ||
('Shipments'[Source] = "FOB" && 'Shipments'[Date] >= DATE(2024, 5, 1) && 'Shipments'[Date] <= DATE(2024, 10, 31))
)
)
Hopefully, the above logic can help you, and if you have any other questions, as lbendlin said, you can provide the complete sample data so that we can help you faster. Please hide sensitive information in advance.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 45 | |
| 43 | |
| 41 | |
| 21 | |
| 20 |