Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
I am trying to calculate days until next quarter from current date, I have used the 'Quarter' and 'today' function to get the current quarter. How do I count the number of days from current date to the beginning of next quarter.
example: today is 3/26/2020; so, I want to get the value 5. since, there are 5 days until quarter 2 of the year 2020. Thank you.
Kind Regards,
Shlok Shah
Solved! Go to Solution.
I do not have any date columns that I could depend on for using DAX in built quarter functions...
Here's how I did it(the harder way)
Current quarter = ROUNDUP(MONTH(TODAY()) / 3,0 )
First month in quarter = ([Current quarter]*3)-2
First day of the quarter = DATE(YEAR(TODAY()),[First month in quarter],1)
Days since first day of Quarter = DATEDIFF([First day of the quarter],TODAY(),DAY)
Last month of current quarter = ([Current quarter]*3)
Last day of current quarter = EOMONTH([First day of current quarter],2)
Total days in current quarter = DATEDIFF([First day of current quarter],[Last day of current quarter],DAY)
Days until next quarter = CALCULATE([Total days in current quarter]-[Days since first day of Quarter])
I do not have any date columns that I could depend on for using DAX in built quarter functions...
Here's how I did it(the harder way)
Current quarter = ROUNDUP(MONTH(TODAY()) / 3,0 )
First month in quarter = ([Current quarter]*3)-2
First day of the quarter = DATE(YEAR(TODAY()),[First month in quarter],1)
Days since first day of Quarter = DATEDIFF([First day of the quarter],TODAY(),DAY)
Last month of current quarter = ([Current quarter]*3)
Last day of current quarter = EOMONTH([First day of current quarter],2)
Total days in current quarter = DATEDIFF([First day of current quarter],[Last day of current quarter],DAY)
Days until next quarter = CALCULATE([Total days in current quarter]-[Days since first day of Quarter])
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
15 | |
7 | |
6 |