Problem with a measure

To make it simple I have to tables connected with 1-M relation. One has distinct order numbers, the second connected via order number have shipment numbers. One order can have many shipment numbers. I built matrix with order number (from table1) and shipment number (from table2)
Zrzut ekranu 2023-07-31 120352

At every shipment number row I would like to have number of all shipment for this order number. So If there are ie. 2 shipment under 1 order I would like to have “2” at every shipment number row. Sounds simple. I just want to ignore shipment number filter coming from matrix but I cannot achieve that. My 1st measure:

Shiping count per order 1 =
CALCULATE(
DISTINCTCOUNT(
‘Sales_shipment_item (DN)’[(DN) ← sales_shipment.increment_id]
),
ALLEXCEPT(‘Order ID Distinct’,‘Order ID Distinct’[increment_id]))

shows the same “1” at every row. Why it works like that? ALLEXCEPT should remove all filters except the one for order number ?
Result:
Zrzut ekranu 2023-07-31 120352

The second measure:
Shiping count per order 2 =
CALCULATE(
DISTINCTCOUNT(
‘Sales_shipment_item (DN)’[(DN) ← sales_shipment.increment_id]
),
ALL(‘Sales_shipment_item (DN)’[(DN) ← sales_shipment.increment_id]))

result in showing all possible shipment number under every single order. Why?

result:
Zrzut ekranu 2023-07-31 120624

How to get correct result?

Hello @Marcin and thank you for starting a conversation in the Community Forum. To allow members to assess the state, would you please add your work-in-progress Power BI Desktop File, the source data file in Excel format, any DAX measures formatted for the reader, and add a description and images of your desired result.

Please also ensure that the data model includes a dedicated Date table to accommodate any time intelligence efforts.

Are there any additional thoughts or questions which you would like to add that may be helpful to the reader who is not familiar with your line of business?