cancel
Showing results for
Did you mean:
Highlighted
Helper III

## DTD or Day to date measure

Is there a SAMEPERIOD LAST DAY equivalent in DAX?
Hence August 1st to 15th versus July 1st to 15th
Given that today is August 15th.

Given that I have a date DB with dates, day, month, year...

Tried the following but not to avail:

Same Period Last Month = CALCULATE(
[Actual Sales_Pesos],
Date_DB[Date],-1,MONTH))

I ended up creating a Matrix with the DAY in Rows, MONTH in Columns and sales measure as Values.
I added a slicer for the day and set is as "Between" so I can adjust the period.
Would prefer being able to extract sale values with a formula instead.
Growth rate swould also be computed dynamically.
hence what percentage of growth is August versus July.

This would change monthly, so next month I would have September  vs August.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage

## Re: DTD or Day to date measure

Hope you Want this

Use these measures

15 Days back revenue =

Comparitive Revenue =
IF(ISBLANK([15 Days back revenue]),BLANK(),[Total Revenue])

Hope this helps! if it helps please mention this as Solution and share your Kudos!!

Thanks

Regards

Vijay Perepa

3 REPLIES 3
Highlighted
Super User II

## Re: DTD or Day to date measure

Hey @Cyrilbrd ,

I have to admit that I do not fully understand what you are looking for. For this reason, I recommend start reading this article: https://www.daxpatterns.com/time-patterns/#

From my experience, alomost everything time/date related calculations are covered. Also how to consider a leapyear and what to do if today is the 31 of Marth 2020.

Hopefully this provides some ideas on how to tackle your challenge.

Regards,

Tom

Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Highlighted
Helper III

## Re: DTD or Day to date measure

I edited my question, I am looking for Day to Date. I can do MTD or YTD but am looking for DTD.

Highlighted
Solution Sage

## Re: DTD or Day to date measure

Hope you Want this

Use these measures

15 Days back revenue =

Comparitive Revenue =
IF(ISBLANK([15 Days back revenue]),BLANK(),[Total Revenue])

Hope this helps! if it helps please mention this as Solution and share your Kudos!!

Thanks

Regards

Vijay Perepa

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

#### Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors