Help with JQL Query

I am trying to get the below query
Distributed Build" in (“Completed CICD Tool”,“In Use”) and status != Cancelled

I developed the below query but its not taking “and” condition:
([Distributed Build].[In Use] + [Distributed Build].[Completed CICD Tool]) - ([status].[cancelled])

To implement this JQL, you may change approach.
Define two separate calculated members, one in Distributed Build dimension and another in Status dimension. Then add both dimensions as page filters and select calculated members.

For the calculated members in Distributed Build dimension you may use Aggregate() function to combine two builds:

Aggregate({
  [Distributed Build].[In Use],
  [Distributed Build].[Completed CICD Tool]
})

For the calculated members in Status dimension to get all statuses except Canceled you may use Except() function:

Aggregate(
  Except(
    -- set of all statuses
    [Status].[Status].Members
    -- set of excluded statuses
    { [Status].[Cancelled] }
  )
)

Best,
Zane / support@eazyBI.com

Thanks @zane.baranovska