fiscal year
6 TopicsDynamic P&L fiscal year time intelligence for actual vs forecast vs budget vs same period last year
Hi Community, I am trying to create a dynamic time intelligent profit and loss statement comparing actuals to forecast, budget, and the same period last year for each line item. I am using a fiscal year calendar which means the standard time intelligence measures will not work. The comparison amount (column) needs to be the variance between the two and not the amount. For example, net sales, the actual amount is 10,000 and the forecast amount is 12,000. The P&L matrix/table should show 10,000 for the actual amount and (2,000) for the forecast amount. Below is a quick picture of what I am trying to achieve: Line-Item Actual vs Forecast vs Budget vs SPLY Net Sales 10,000 (2,000) (1,000) (3,000) COGS 4,000 2,000 1,000 500 Additionally, I would like to see this on a WTD, MTD, QTD, and YTD basis in one matrix/table. Below is a screenshot of the final product I am trying to create along with the format strings: As you can see, we have four different format strings: whole numbers, whole number dollars, decimal, and percentages. My data model is pictured below: Below is a picture of what I currently have: I have created all the individual line-item measures for actuals, forecast, and budget using the measure branching technique. However, I know this is not the best way to do this because I have three measures for each line item. For example, I have a measure for actual net sales, forecast net sales, and budgeted net sales. As you can see, the forecast, budget, and SPLY measures are not variance amounts. The actual, forecast and budget measures use the SWITCH technique which prevents me from calculating the variance because of the four different format strings and a custom time intelligence function. Below is an example of my Actuals measure: Act HL = SWITCH( [Selected Account], 1, FORMAT([Volume], "#,#;(#,#);-"), 2, FORMAT([Net Sales], "$#,#;($#,#);-"), 3, FORMAT([COGS], "$#,#;($#,#);-"), 4, FORMAT([Gross Margin], "$#,#;($#,#);-"), 5, FORMAT([MAP/MDF], "$#,#;($#,#);-"), 6, FORMAT([SG&A], "$#,#;($#,#);-"), 7, FORMAT([Combined EBIT], "$#,#;($#,#);-"), 9, FORMAT([Net Sales Rate], "$#,0.00;($#,0.00);-"), 10, FORMAT([COGS Rate], "$#,0.00;($#,0.00);-"), 11, FORMAT([Gross Margin Rate], "$#,0.00;($#,0.00);-"), 12, FORMAT([MAP/MDF Rate], "$#,0.00;($#,0.00);-"), 13, FORMAT([SG&A Rate], "$#,0.00;($#,0.00);-"), 14, FORMAT([Combined EBIT Rate], "$#,0.00;($#,0.00);-"), 16, FORMAT([GM as % of Net Sales], "0.0%;-0.0%;-"), 17, FORMAT([Combined EBIT as % of Net Sales], "0.0%;-0.0%;-") ) This measure above is then placed into a time intelligence pattern using the SQLBI DAX Patterns for Week-related calculations. As previously mentioned, I am using a fiscal year calendar so the standard time intelligence measures will not work. For example, the Act WTD column in my matrix above is: Act WTD = IF ( [ShowValueForDates], VAR LastDayOfWeekAvailable = MAX ( 'Date'[Day of Week Number] ) VAR LastFiscalYearWeekAvailable = MAX ( 'Date'[Fiscal Year Week Number] ) VAR Result = CALCULATE ( [Act HL], ALLEXCEPT ( 'Date', 'Date'[Working Day], 'Date'[Day of Week] ), 'Date'[Day of Week Number] <= LastDayOfWeekAvailable, 'Date'[Fiscal Year Week Number] = LastFiscalYearWeekAvailable ) RETURN Result ) The matrix has 16 measures like you see above (actual + forecast + budget + SPLY = 4 x 4 = 16 measures) Obviously this not an efficent or sustainable way to create this. I have a feeling Calculation Groups might help solve the problem. Additionally, when slicers are placed on the page, the query is slow because of the number of measures and the size of the data tables. So community, how can I achieve the above? Thank you for taking the time to read through my question.1.8KViews0likes4CommentsHow to change fiscal year coding
I have taken over a file that already had a default calendar table. My company's fiscal year starts on 4/1 each year and am looking to make adjustments to the calendar table to reflect this. Right now coding is Fiscal Year",if(_startOfFiscalYear=1,YEAR([Date]),YEAR([Date])+ QUOTIENT(MONTH([Date])+ (13-_startOfFiscalYear),13)) How would I update this to start the FY in April and how can I change to have the data show as FY159 instead of 2024?Solved773Views0likes3CommentsDax for start quarter week in fiscal year to selected week
I have relative week numbers, and through scliers I have selected relative week. I want total sum of weeks from first week of quarter to selected week. Please consider this is a fiscal week from Feb to Feb, and data is aggregate on weekly there is no any calendar table.474Views0likes2CommentsUrgent help to fix the Measure issue
Hi All, amitchandak, mahoneypat, daxer-almighty can anyone help me to fix this issue, I have Dax measures for L1, L4, L13, L52 which calculates total sales value based on the base week selected in the slicer. Example, 1) If base week(fiscal year & fiscal week) (202052) is selected then the L1 measure calculates total sales by subtracting 1 week that is (202051) 2) If base week(fiscal year & fiscal week) (202052) is selected then the L4 measure calculates total sales by subtracting 4 weeks that is (202051,202050,202049, 202048) 3) If base week(fiscal year & fiscal week) (202052) is selected then the L13 measure calculates total sales by subtracting 13 weeks that is (202051,202050,202049, 202048,202047,202046,202045,202044,202043,202042,202041,202040) 4) If base week(fiscal year & fiscal week) (202052) is selected then the L13 measure calculates total sales by subtracting 13 weeks that is (202051 to 202001) Dax Measures 1) L1 = CALCULATE([Total Sales],FILTER(Catman_Calendar,and(((Catman_Calendar[CY_BASEWEEK])=(MAX( Weeklist[Base Week]))),((Catman_Calendar[CY_BASEWEEK])=([CY_BaseWeek_Selected]))))) 2) L4 = (CALCULATE([Total Sales],FILTER(Catman_Calendar,and(((Catman_Calendar[CY_BASEWEEK])>(MAX( Weeklist[Base Week])-4)), ((Catman_Calendar[CY_BASEWEEK])<=([CY_BaseWeek_Selected])))))) 3) L13 = (CALCULATE([Total Sales],FILTER(Catman_Calendar,and(((Catman_Calendar[CY_BASEWEEK])>(MAX( Weeklist[Base Week])-13)),((Catman_Calendar[CY_BASEWEEK])<=([CY_BaseWeek_Selected])))))) 4) L52 = (CALCULATE([Total Sales],FILTER(Catman_Calendar,and(((Catman_Calendar[CY_BASEWEEK])>(MAX( Weeklist[Base Week])-52)),((Catman_Calendar[CY_BASEWEEK])<=([CY_BaseWeek_Selected])))))) Until the 202052 formula was working fine after the fiscal year changed to 202101 from there these formula is not working so I need help to fix this issue. I have attached the screenshots below for reference981Views0likes3CommentsIssue with Timeline slicer week selection - for Fiscal Year implementation
I have the timeline slicer implemented with below settings. a) trying to show Fiscal Year (July to Jun) b) Sunday being the first day of the week I needed to show Fiscal years on the slicer and not calendar year (supposed I select Aug 2015, needs to show as Aug FY16). Hence, I added another column using the below DAX and used that for Timeline slicer which would be the exact date after one year. (also as stated here) TimeLine Slicer Date = DATE ( YEAR ( DateCalendar[Date] )+1, MONTH ( DateCalendar[Date] ), DAY ( DateCalendar[Date] )) This works fine at the Yearly/monthly level but unfortunately, not at weekly level. When I select a particular week say W28 of FY16, the days are not being selected correctly : In some cases it selects “Sun to Sat” in some cases “Sat to Fri” (based on the year). Could you please advise how I can show fiscal dates on the slicer and make it work correctly at all the levels for all FYs. (Attaching the pbix file for reference) Thank You, Harish