Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Syndicate_Admin
Administrator
Administrator

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 to the final balance of 02-03

In this case to the table add an Initial Balance Date field, and use the formula "nextday", but it does not work, because to the date that corresponds to 26-02, it leaves it blank, since it does not find in this table the date 27.

Also use, Final Balance (date) +1, but also not, since what I intend, is that 26-02 corresponds to the next day of skill, but precisely that of the table, in this case 01-03.

It doesn't serve to filter by weekend, because I can have holidays or non-working, not just weekends.

Source table:

TablaSaldo Final

IdentificationIdcuentabancariadate Balance End number
73517202/03/2021 $ 39.843.865,7310003272284
7342421/3/2021 $ 20.604.309,1710003272284
73362226/2/2021 $ 41.442.774,3310003272284
73335225/2/2021 $ 32.222.477,2910003272284

Expected Result

Final Balance Table

IdentificationIdcuentabancariaDate Final balance Balance End numberDate Initial BalanceStarting Balance
73517202/03/2021 $ 39.843.865,73100032722843/3/2021 $ 39.843.865,73
7342421/3/2021 $ 20.604.309,171000327228402/03/2021 $ 20.604.309,17
73362226/2/2021 $ 41.442.774,33100032722841/3/2021 $ 41.442.774,33
73335225/2/2021 $ 32.222.477,291000327228426/2/2021 $ 32.222.477,29
1 ACCEPTED SOLUTION
Anonymous
Not applicable

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 :

Ailsa-msft_0-1619686732887.png

 

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.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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 :

Ailsa-msft_0-1619686732887.png

 

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.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.