i found this solution for my case where i want to calculate orders with only one product, so i changed it like that and it works
Number of orders with one id product =
CALCULATE(
DISTINCTCOUNT(Orders[order number]),
FILTER(
SUMMARIZE(Orders, Orders[order number]),
CALCULATE(
DISTINCTCOUNT(Orders[Id_product]),
ALLEXCEPT(Orders, Orders[order number])
)=1
)
)