Skip to main content
cancel
Showing results for 
Search instead 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

Reply
PradipMCT
Resolver II
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

@PradipMCT

 

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,

View solution in original post

5 REPLIES 5
pedrodax23
New Member

Hi @v-sihou-msft 

 

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

 

FY_Parallel_period.png

 

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 )

        )
hemantsingh
Helper V
Helper V

Hi @PradipMCT,

 

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

 


This link will help you in understanding it better. 

 

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

 

 

Regards,

Hemant

 

 

 

  

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 ()

@PradipMCT

 

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,

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,

Helpful resources

Announcements
Fabric Community Conference

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.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

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