Forum Discussion

amaral_diego's avatar
amaral_diego
Helper II
1 year ago
Solved

How to Automatically Move Unfinished Projects to the Next Month in Power BI

In Power BI, I have a table that counts the number of projects that need to be completed by their due date. However, there is a need for projects that are not completed within the specified month to ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi amaral_diego ,

     

    I update the measure, you can try this one.

    AjustarData =
    VAR _Today =
        TODAY ()
    VAR _DATEDIFF =
        DATEDIFF ( 'Table'[Termino], TODAY (), DAY )
    VAR _DATE1 =
        EOMONTH ( TODAY (), -1 ) + DAY ( 'Table'[Termino] )
    VAR _DATE2 =
        EOMONTH ( _DATE1, 0 ) + DAY ( 'Table'[Termino] )
    RETURN
        IF (
            'Table'[Status] = "Complete",
            'Table'[Termino],
            IF (
                'Table'[Termino] < _Today,
                IF ( _DATE1 < TODAY (), _DATE2, _DATE1 ),
                'Table'[Termino]
            )
        )

    Result of my sample is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.