Spreadsheet: 875229d1721812380-aggregate-function-with-criteria-but-avoiding-duplicates-example
Sheet: Database

ID | Prod no. | Prod name adapted | Payer | Payer [NAME] | Product (adapted) | 2024M01 | 2024M02 | 2024M03 | 2024M04 | 2024M05 | 2024M06 | 2024M07 | 2024M08 | 2024M09 | 2024M10 | 2024M11 | 2024M12 | Comment
 | 20000 | MED | 25000 | MAR | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 20000 | MED | 27500 | DES | HRCL_PI |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 20000 | MED | 10000 | [NAME] | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | xxx
 | 300000 | FN | 400000 | AC | ECCS_CL |  |  |  |  |  |  |  |  |  |  |  |  | zzz
 | 300000 | FN | 400000 | AC | TP_CL |  |  |  |  |  |  |  |  |  |  |  |  | zzz
 | 300000 | FN | 400000 | AC | TP_CL |  |  |  |  |  |  |  |  |  |  |  |  | zzz
 | 300000 | FN | 400000 | AC | ELCL_V |  |  |  |  |  |  |  |  |  |  |  |  | zzz
 | 300000 | FN | 40000 | BEL | BL_CL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 300000 | FN | 400000 | AC | [NAME] |  |  |  |  |  |  |  |  |  |  |  |  | yyy
 | 300000 | FN | 40000 | BEL | CRCL_FH |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 300000 | FN | 600000 | GEN | [NAME] |  |  |  |  |  |  |  |  |  |  |  |  | yyy
 | 300000 | FN | 60000 | BRE | HRCL_PI |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 300000 | FN | 20000 | STC | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 300000 | FN | 10000 | [NAME] | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | xxx
 | 300000 | FN | 20000 | STC | CRCL_FH |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 300000 | FN | 40000 | BEL | CRCL_FH |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 300000 | FN | 150000 | EHS | HRCL_PI |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 3000 | ES | 400000 | AC | ECCS_CL |  |  |  |  |  |  |  |  |  |  |  |  | zzz
 | 3000 | ES | 400000 | AC | TP_CL |  |  |  |  |  |  |  |  |  |  |  |  | zzz
 | 3000 | ES | 400000 | AC | [NAME] |  |  |  |  |  |  |  |  |  |  |  |  | yyy
 | 40000 | BE | 400000 | AC | ELCL_V |  |  |  |  |  |  |  |  |  |  |  |  | zzz
 | 40000 | BE | 30000 | LOR | ELCL_ZP |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 40000 | BE | 400000 | AC | [NAME] |  |  |  |  |  |  |  |  |  |  |  |  | yyy
 | 60000 | BRE | 25000 | MAR | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 60000 | BRE | 600000 | GEN | CRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 600000 | GEN | 25000 | MAR | CRCL_FH |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 600000 | GEN | 10000 | [NAME] | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | xxx
 | 600000 | GEN | 60000 | BRE | [NAME] |  |  |  |  |  |  |  |  |  |  |  |  | yyy
 | 600000 | GEN | 60000 | BRE | HRCL_PI |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 600000 | GEN | 600000 | MON | CRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 150000 | EH | 150000 | STC | CRCL_FH |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 150000 | EH | 150000 | POL | SL |  |  |  |  |  |  |  |  |  |  |  |  | other flow
 | 150000 | EH | 150000 | BRE | SL |  |  |  |  |  |  |  |  |  |  |  |  | other flow
 | 2000 | SES | 25000 | MAR | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 2000 | SES | 600000 | GEN | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 2000 | SES | 45000 | POL | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 2000 | SES | 60000 | BRE | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow
 | 2000 | SES | 3000 | ESP | HRCL |  |  |  |  |  |  |  |  |  |  |  |  | normal flow