Forum Discussion
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
- AnonymousNot 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