Formula Error

I want to create a formula that returns the median value when the criteria is met and "0" when the criteria is not met (no data). I used IFERROR for this purpose, however I received a #INCORRECT ARGUMENT SET error. Can someone assist me in fixing this formula? I appreciate your help.

This is the formula for your reference: =IFERROR(MEDIAN(COLLECT({Case Data Range 2}, {Case Data Range 1}, CONTAINS("Closed", @cell), {Case Data Range 7}, <>"True", {Case Data Range 6}, [Primary Column]@row, {Case Data Range 3}, >=DATE(2023, 7, 1), {Case Data Range 3}, <DATE(2024, 7, 1))), 0)

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    I would think the IFERROR would take care of it. Lets try this:

    =IF(ISERROR(IFERROR(MEDIAN(COLLECT({Case Data Range 2}, {Case Data Range 1}, CONTAINS("Closed", @cell), {Case Data Range 7}, <>"True", {Case Data Range 6}, [Primary Column]@row, {Case Data Range 3}, >=DATE(2023, 7, 1), {Case Data Range 3}, <DATE(2024, 7, 1))), 0)), 0, IFERROR(MEDIAN(COLLECT({Case Data Range 2}, {Case Data Range 1}, CONTAINS("Closed", @cell), {Case Data Range 7}, <>"True", {Case Data Range 6}, [Primary Column]@row, {Case Data Range 3}, >=DATE(2023, 7, 1), {Case Data Range 3}, <DATE(2024, 7, 1))), 0))

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!