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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lavdeepk
Resolver I
Resolver I

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
v-yingjl
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
v-yingjl
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.

amitchandak
Super User
Super User

@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.

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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