Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
5 years ago
Solved

date

Good afternoon, I have a situation. I need to form the initial balance, which responds to the final balance of "End Balance Date + 1 or next day skilled example: the starting balance at 03-03, is t...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Syndicate_Admin 

    Please correct me if I wrongly understood your question.

    As you said ,if the next day of final date is weekdays , then return the date of next day .If the next day of final date is weekend ,then return the date of next Monday .

    I create a measure like this:

    Start Date =

    var _backday=WEEKDAY(SELECTEDVALUE('Saldo Final'[cuentabancariadate]),2)

    return IF(_backday<5,SELECTEDVALUE('Saldo Final'[cuentabancariadate])+1,SELECTEDVALUE('Saldo Final'[cuentabancariadate])+3)

     

    I mark [final date] with 1-7, 1 for Monday, 2 for Tuesday, and so on. So when date is less than 5, its next day is always a working day .Then you can +1 to the date, otherwise +3 .

    The effect is as shown :

     

    Best Regards

    Community Support Team _ Ailsa Tao

     

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