Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.