Forum Discussion

Nick_2510's avatar
Nick_2510
Icon for Helper I rankHelper I
4 years ago
Solved

IF Conditions

Hi everyone! I need to add one option in IF constraction... switch off name if name in a period - data for this is in another table with colomns (Name, Start_period, End_Period)   working constra...
  • tamerj1's avatar
    tamerj1
    4 years ago

    Nick_2510 
    Please try

    Count of -ve =
    SUMX (
        CROSSJOIN ( VALUES ( 'Календарь'[Date] ), VALUES ( Data[Name] ) ),
        CALCULATE (
            IF (
                [diff_AvSal_bal] > 0
                    || 'Календарь'[Date]
                        IN CALENDAR (
                            CALCULATE ( MAX ( 'Sheet1'[Start_per] ) ),
                            CALCULATE ( MAX ( 'Sheet1'[End_per] ) )
                        ),
                0,
                1
            )
        )
    )