Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

If statement "too few arguments"

Hi all,   I am using power BI for the first time and I am struggling a bit to write an IF function. Idea is very basic, I need to check a cell value (days overdue) and then return a corresponding t...
  • tex628's avatar
    7 years ago
    AgingBucket =
    IF(
    [LOOKUP]('As of 6 30 2019'[Days Overdue])<0,"not due",
    IF(
    [LOOKUP]('As of 6 30 2019'[Days Overdue])<61,"61-90", 
    IF(
    [LOOKUP]('As of 6 30 2019'[Days Overdue])<61, "61-90",
    IF(
    [LOOKUP]('As of 6 30 2019'[Days Overdue])<121,"91-120",
    IF(
    [LOOKUP]('As of 6 30 2019'[Days Overdue])<151,"121-150",
    IF(
    [LOOKUP]('As of 6 30 2019'[Days Overdue])<181,"151-180",
    IF(
    [LOOKUP]('As of 6 30 2019'[Days Overdue])<366,"181-365",
    IF(
    [LOOKUP]('As of 6 30 2019'[Days Overdue])>365,"1+Years" WE NEED ELSE STATEMENT HERE
    )))))))))))))

    Missing else on the last IF and missing ")" on a few IF's.