Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

IF Condition result

Hello guys,   I have a formula that is something like this:     RoadmapStart = IF( IF( Roadmap[Aux] = "ROM", Roadmap[ROM Start].[Date], Roadmap[In Progress Start].[...
  • AllisonKennedy's avatar
    6 years ago
    In this case, you could try variables:

    Column=
    VAR _Date = IF(
    Roadmap[Aux] = "ROM",
    Roadmap[ROM Start].[Date],
    Roadmap[In Progress Start].[Date]
    )
    RETURN
    IF(
    _Date < DATE(2020,01,01),
    DATE(2020,01,01),
    _Date
    )

    Note though that variables are calculated when they are defined, not when they are used, so in some measures this can change their context. (not needed for this one, but good to know for future).