cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
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
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 )

st.png

 

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.

View solution in original post

4 REPLIES 4
Community Support
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 )

st.png

 

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.

View solution in original post

Super User IV
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

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

@amitchandak 

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

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
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

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

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors