cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Resolver II

## Last YTD DAX calculation by Fiscal Year

Hi All,

Few time intelligence functions like, TotalYTD(), Parallelperiod(), Sameperiodlastyear() are few functions that work great with the Calendar year but how to use these functions with fiscal years?

1 ACCEPTED SOLUTION
Employee

For TOTALYTD(), you can add an argument to specify the "end-of-year" for Fiscal scenario. For SAMEPERIODLASTYEAR() and PARALLELPERIOD() function, you can only use DATEADD() function on date column to achieve time intelligence.

Regards,

5 REPLIES 5
New Member

I am trying to solve this problem of comparing to TOTAL Last Financial Year to date against monthly Financial Year to Date.

Se image below to understand better what I need

I saw your suggestion and did not understand but I kind of found a workable solution. Although I do not understand much of what is going on and also think it is not so elegant solution.

here is the working code.

``````PreviousFY_Working =
CALCULATE (
CALCULATE (
[SalesAmount],
DATESBETWEEN (
'Date'[Date],
DATE ( YEAR ( MAX ( 'Date'[Date] ) ), 7, 1 ),
DATE ( YEAR ( MAX ( 'Date'[Date] ) ) + 1, 6, 30 )
)
),
DATEADD ( 'Date'[Date], -18, MONTH )

)``````
Helper V

You can use the function "DATESYTD" for this purpose.

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0ff756db-5ecc-4e66-bb26-3e03bec7c142/fiscal...

Regards,

Hemant

Resolver II
Hey Hemant

Thanks. Ibam aware of this function. However i was looking the alternative to parallelperiod () and sameperiodlastyear () functions. The totalytd ()is the alternative to datesytd ()
Employee

For TOTALYTD(), you can add an argument to specify the "end-of-year" for Fiscal scenario. For SAMEPERIODLASTYEAR() and PARALLELPERIOD() function, you can only use DATEADD() function on date column to achieve time intelligence.

Regards,

Helper V

U trying to achieve running totals??? It would be great if you can provide some sample data & the end result you want to achieve.

Regards,

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors