cancel
Showing results for
Did you mean:
Helper II

## How to calculate starting date the quarter for a specific date

Hi All,

I have date 2020-10-21 This date fall under Q4 and starting date of Q4 is 2020-10-01 Is there any dax formula by using i can calculate starting date of quarter for any specific date ?

Thnaks

Lavdeep

1 ACCEPTED SOLUTION
Community Support

Hi @lavdeepk ,

You can use a variable to save a specific date and use this measure to show the start of the quarter of this date:

Start date of quarter =
VAR _Date =
DATE ( 2020, 10, 21 )
RETURN
DATE ( YEAR ( _Date ), ROUNDUP ( DIVIDE ( MONTH ( _Date ), 3 ), 0 ) * 3 - 2, 1 )

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

4 REPLIES 4
Community Support

Hi @lavdeepk ,

You can use a variable to save a specific date and use this measure to show the start of the quarter of this date:

Start date of quarter =
VAR _Date =
DATE ( 2020, 10, 21 )
RETURN
DATE ( YEAR ( _Date ), ROUNDUP ( DIVIDE ( MONTH ( _Date ), 3 ), 0 ) * 3 - 2, 1 )

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Super User IV

@lavdeepk , You have a function for that startofquarter

startofquarter(Date[Date])

https://docs.microsoft.com/en-us/dax/startofquarter-function-dax

remember it needs continuous dates

Tutorial Series Dax Vs SQL Direct Query PBI Tips

Proud to be a Super User!

Helper II

Thanks, Amit for the quick response I an aware of startofquarter formula where I have to pass the date column In my case I have don't have a date column only have a single date want to know that date quarter starting date using dax formula

Super User III

Hi,

You must have a Calendar table with fiscal quarters defined.  Only then will will Startofquarter function work.

Regards,
Ashish Mathur
http://www.ashishmathur.com

Announcements

#### Happy New Year from Power BI

This is a must watch for a message from Power BI!