Need help finding current quarter in a non January start.

shophoney

Active Member
Joined
Jun 16, 2014
Messages
286
Hi,

I'm trying to create a DAX formula to figure out the current QUARTER.

Below are a few of my attempts. Our year starts Feb 1 to Jan 31.

=if(dCalendar[DATES]<today(),if(ROUNDUP(MONTH(TODAY())/3, 0)=dCalendar[QTR],"CURRENT QTD",""),"")

QTR
=if(ROUNDUP((MONTH(TODAY())-1)/3, 0)=0,4)


So, Feb-Apr would be QTR 1.

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Excel Formula:
=SWITCH(MONTH(TODAY()),1,4,2,1,3,1,4,1,5,2,6,2,7,2,8,3,9,3,10,3,11,4,12,4)

The formula works as follows: it switches the value behind the number to be fond. So for instance for january, it looks up 1 in the list:
1,4,
2,1,
3,1,
4,1,
5,2,
6,2,
7,2,
8,3,
9,3,
10,3,
11,4,
12,4
1 has 4 attached to it.
For May (5): 5 has 2 attached to it
 
Upvote 0
I would recommend making a Calendar Table with one or more Quarters columns. A great video for creating it is here - What is a Date Table / Calendar table in Power BI / Excel, as well as sample Excel and Power BI files with the calendar queries. All that's needed is to set the Start Date, Number of Years needed, Month Number For End Financial Year, and the First Day of the Week - all clearly explained in the sample Excel file. Once you have the calendar built, connect your table's dates with the Date column in the Calendar table, hide all dates in your tables from Client Tools so that you're only using the Calendar Dates in reports, and the Quarters for the dates in your tables will automatically be connected through the relationship of the table's dates with the Calendar Table. That should also make your DAX formulas easier to create.
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,157
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top