Forum Discussion
Financial Year, Current vs Last
Hi Everyone,
I know it's been discussed here but I'm still stuck.
Need to create a report that will compare this year's Gross Sales by Product (01/07/24 - today) vs last year (01/07/23 - 30/06/24) Gross Sale by product.
I created a Date table:
Can someone help me understand what I'm missing here?
Hi cocoloco79 - Ok , can you please try below
SalesCurrentFY =
CALCULATE(
SUM(Grower[Gross]),
DATESBETWEEN(
DateTable[Date],
DATE(YEAR(TODAY()), 6, 30), // Start on June 30th instead of July 1st
TODAY() + 1 // Include today and the next day, just to catch everything
)
)Previous FY , Create below measure
SalesPreviousFY =
CALCULATE(
SUM(Grower[Gross]),
DATESBETWEEN(
DateTable[Date],
DATE(YEAR(TODAY()) - 1, 6, 30), // Start on June 30th instead of July 1st
DATE(YEAR(TODAY()), 6, 30) + 1 // Extend by one day
)
)Make sure there are no unintended relationships in your data model that could be affecting the totals.it may help to temporarily remove all filters and relationships.
Hope this works
4 Replies
- rajendraongole1
Super User
Hi cocoloco79 - Create a new calculated column for FY and here i am considering FY from july 1st to current yr.
Create two measures to current and PY financial year and match that the date range is correctly captured.
Current Financial Year Sales
SalesCurrentFY =
CALCULATE(
SUM(Grower[Gross]),
FILTER(
ALL(DateTable),
DateTable[Date] >= DATE(YEAR(TODAY()), 7, 1) &&
DateTable[Date] <= TODAY()
)
)Another measure for Previous Financial Year Sales
SalesPreviousFY =
CALCULATE(
SUM(Grower[Gross]),
FILTER(
ALL(DateTable),
DateTable[Date] >= DATE(YEAR(TODAY()) - 1, 7, 1) &&
DateTable[Date] <= DATE(YEAR(TODAY()), 6, 30)
)
)Hope this works.
- cocoloco79
Helper III
rajendraongole1 Thank you, but I get the same result as in Gross Sales which is about 25% short.
The data table alligns the correct Financial year, so I belive that working correctly. Its the FY Gross measure that is the issue I think. Anything else I can try?
- rajendraongole1
Super User
Hi cocoloco79 - Ok , can you please try below
SalesCurrentFY =
CALCULATE(
SUM(Grower[Gross]),
DATESBETWEEN(
DateTable[Date],
DATE(YEAR(TODAY()), 6, 30), // Start on June 30th instead of July 1st
TODAY() + 1 // Include today and the next day, just to catch everything
)
)Previous FY , Create below measure
SalesPreviousFY =
CALCULATE(
SUM(Grower[Gross]),
DATESBETWEEN(
DateTable[Date],
DATE(YEAR(TODAY()) - 1, 6, 30), // Start on June 30th instead of July 1st
DATE(YEAR(TODAY()), 6, 30) + 1 // Extend by one day
)
)Make sure there are no unintended relationships in your data model that could be affecting the totals.it may help to temporarily remove all filters and relationships.
Hope this works