Need Help this Function

I want that if [courier name] is equal to [courier] and [channel] is equal to [channel], then count how many values are there in [awb no]. Then match that value with [Quantity]. If all three conditions are met, an entry should be made, otherwise not.

IF(

AND(

ISNOTBLANK([COURIER NAME]),

ISNOTBLANK([CHANNEL])

),

IF(

AND(

IN([COURIER NAME], SELECT(Scan Sheet Contains[COURIER NAME], AND([COURIER NAME] = [_THISROW].[COURIER NAME], [CHANNEL] = [_THISROW].[CHANNEL]))),

IN([CHANNEL], SELECT(Scan Sheet Contains[CHANNEL], AND([COURIER NAME] = [_THISROW].[COURIER NAME], [CHANNEL] = [_THISROW].[CHANNEL])))

),

COUNT(

FILTER(

“Scan Sheet Contains”,

AND(

[COURIER NAME] = [_THISROW].[COURIER NAME],

[CHANNEL] = [_THISROW].[CHANNEL],

[AWB NO] = [_THISROW].[AWB NO]

)

)

) = [_THISROW].[QUANTITY],

FALSE

),

TRUE

)

Expression is working here but there is a problem with it. I want [aWb no] count equal matches with [quantity] . :pensive_face:

Please help