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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Problem with working days formula

Guys, I'm having trouble calculating the working days of today for a date.
I've already revised the formula, the data and always the result is -1

 

Dias úteis = CALCULATE(SUM(Tab_1dado4[Dia Util?]),
DATESBETWEEN(Tab_1dado4[DATA],
Tab_1dado4[FINAL],
Tab_1dado4[Coluna]))-1

 

davidoni_0-1652964200621.png

 

1 ACCEPTED SOLUTION
PC2790
Community Champion
Community Champion

Hey @Anonymous ,

 

You need to have a Dates/Calednar table with continuous dates and join your table with the date table and then modify your code as:

Calculate(Sum(Tab_1dado4[Dia Util?), Datesbetween(DateTable,

ab_1dado4[DATA],
Tab_1dado4[FINAL]))
See if that works.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@PC2790 Thank you very much! It worked out! That was it

PC2790
Community Champion
Community Champion

Hey @Anonymous ,

 

You need to have a Dates/Calednar table with continuous dates and join your table with the date table and then modify your code as:

Calculate(Sum(Tab_1dado4[Dia Util?), Datesbetween(DateTable,

ab_1dado4[DATA],
Tab_1dado4[FINAL]))
See if that works.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors