Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

If Formula with a range?

I have 2 measures. 

Measure 1: Time = DATEDIFF([ERDAT],[CLDAT1].[Date],DAY)

 

Measure 2:  Target = IF([Time]<=21,"in time","overdue")

 

If CLDAT1 is empty than Measure 2 shows as well "in time". Which is wrong. It should be either be empty  or a text "in progress".

Any idea is welcome.

  • Anonymous's avatar
    Anonymous
    7 years ago

    If CLDAT1 is empty does that make Time empty?

    If so, try:

    Target = IF(ISBLANK([Time]),BLANK(),IF([Time]<=21,"in time","overdue"))

    Or

    Target = IF(ISBLANK([Time]),"in progress",IF([Time]<=21,"in time","overdue"))

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    If CLDAT1 is empty does that make Time empty?

    If so, try:

    Target = IF(ISBLANK([Time]),BLANK(),IF([Time]<=21,"in time","overdue"))

    Or

    Target = IF(ISBLANK([Time]),"in progress",IF([Time]<=21,"in time","overdue"))