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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Custom start and end date time DAX statement

Hello All,

 

Its been a while I have posted but hoping I will get some help on an issue I am working on.

 

I am working on a report where I am suppose to get weekly data for packing and shipping. So, the definition for week in the organization is from Friday 7:00 am - Friday 6:59 am. So, I am supposed to get a total of packed items for each week. I am using first day of week as friday, but stuck on the time constraint. I am struggling to get data between the times. In other words, the week sum is also inclusing data from end date Friday after 7:00 am which is not correct. 

 

 

Ex: 04/16 7:00 am - 04/23 6:59 am sum of packed items - 345 (supposed to be the result)

Instead I am getting, 445 which is the data from 04/16 12:00 am - 04/23 11:59 pm

 

Please advice on this.

 

 

Thanks,

Prashanthi

1 REPLY 1
Anonymous
Not applicable

@Anonymous 

 

The answer to 90%+ problems is to have a correct data model. If a model is twisted in any way, no amount of DAX can make it right. You should have a custom calendar in your model that would take into consideration the specifics of your business. About custom calendars: Create Custom Time Intelligence Calculations in #dax #powerpivot #tabular - SQLBI

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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