{"id":"code-work-fin-fiscal-quarter-label","audience":"finance","category":"coding","track":"coding","technique":"examples","title":"Label dates with a July-start fiscal quarter","free":false,"task":"Write one Excel formula for Sales!F2 (filled down) that labels the date in B2 with its fiscal quarter. The fiscal year starts July 1 and is named for the calendar year it ends in, so October 14, 2026 is FY27-Q2. Quarters: Jul-Sep Q1, Oct-Dec Q2, Jan-Mar Q3, Apr-Jun Q4. Labels must look exactly like FY27-Q2 (two-digit year, hyphen). One formula in one code block, then under 25 words outside the code.","materialLabel":"Sales sheet preview (attached to your prompt automatically)","material":"SALES sheet - Northgate Supply (row 1 is headers)\nA Order | B Order date | C Customer | D Region | E Amount | F Fiscal quarter\nSO-1102 | 06/28/2026 | Lakeview Dental | West | 18,400 | ?\nSO-1140 | 07/02/2026 | Birch & Cole | West | 9,750 | ?\nSO-1187 | 10/14/2026 | Mesa Florists | East | 22,100 | ?\nSO-1213 | 01/05/2027 | Ridge Auto | West | 31,000 | ?\nSO-1240 | 04/30/2027 | Okafor Catering | East | 5,400 | ?\n\nNotes:\n- Leadership reviews revenue by fiscal quarter, not calendar quarter.\n- The board pack calls the current year \"FY27\".\n- A pivot table on the Dashboard tab groups by column F.\n- Older rows used labels like \"2026 Q3\", which we're replacing.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":25}],"mistakes":[{"title":"Not saying when the year starts","why":"The AI uses calendar quarters, so October lands in Q4.","fix":"Add: \"Fiscal year starts July 1 and is named for the year it ends.\"","checks":["r0","r1"]},{"title":"Not showing the label","why":"The AI writes \"FY2027 Q2\" or \"Q2 FY27\", which breaks the pivot table.","fix":"Add an example: \"October 14, 2026 is FY27-Q2.\"","checks":["r2"]},{"title":"Getting a menu of options","why":"The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself.","fix":"Add: \"Give one formula only, in one code block, no alternatives.\"","checks":["codeBlocks"]},{"title":"Getting a tutorial","why":"By default the AI explains every part of the code at length, which you then have to scroll past.","fix":"Add: \"After the code, one line under 10 words. Nothing else.\"","checks":["maxProseWords"]}],"promptHints":[{"label":"Gives the year start","patterns":["july","fiscal year starts","jul"]},{"label":"Shows the label","patterns":["fy27-q2","fy\\d\\d-q","exactly like"]},{"label":"Lists the quarters","patterns":["jul-sep","oct-dec","q1"]},{"label":"Asks for one answer only","patterns":["\\b(one|single|1)\\s+(formula|code block|block|version)","only one","no (alternatives|options|other versions)"]},{"label":"Limits the explanation","patterns":["\\d+\\s*words","no (explanation|notes|commentary)","one (short )?(line|sentence)","nothing else"]}],"hint":"Give the AI one real date and the exact label it should become; that settles both the year rule and the format.","rubricLabels":["Names the fiscal year for the year it ends: dates from July onward get the next year (YEAR(B2)+(MONTH(B2)>=7) or similar), so 07/02/2026 is FY27 and 06/28/2026 is FY26","Gets the quarter right: Jul-Sep Q1, Oct-Dec Q2, Jan-Mar Q3, Apr-Jun Q4 (for example INT(MOD(MONTH(B2)-7,12)/3)+1)","Builds the label exactly like FY27-Q2: two-digit year (RIGHT(...,2) or MOD(...,100)), then a hyphen, then Q and the number"]}