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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
techvidya
Frequent Visitor

YTD for Fiscal Year

Hello All,

 

Hope you all are safe. Iam writing here for two of my requirements

I have two tables(Arrivals & Calender). Iam linking Arrival Date column of Arrivals Table with Date Column in Calender.

Now, i have to calculate two values:

1. YTD Arrivals: which should get me the count of arrivals from beginning of fiscal year to current date.

2.Total Booked: Which should get me the count of arrivals after current date to beginning of New fiscal year.

 

My Fical Year is October 1st to September 30th.

 

Hoping for a Expert Solution

 

Many Thanks

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @techvidya 

Due to I don't know your data model, I build two table sample to have a test.

Arrival Table(Arrival Data Column , Quantity Column)

Calendar table: 

 

Calendar = CALENDAR(DATE(2018,01,01),DATE(2020,12,31))

 

You can build measure to calculate YTD Arrivals and Total Books.

YTD Arrivals: It will calculate the sum of arrivals between 2019/10/01 and Today(2020/09/29)

 

YTD Arrivals =
CALCULATE (
    SUM ( Arrival[Quantity] ),
    FILTER (
        Arrival,
        Arrival[Arrival Date]
            >= DATE ( YEAR ( TODAY () ) - 1, 10, 01 )
            && Arrival[Arrival Date] <= TODAY ()
    )
)

 

Total Booked:It will calculate the sum of arrivals between 2020/09/30 and 2020/10/01 (no equal)

 

Total Booked =
CALCULATE (
    SUM ( Arrival[Quantity] ),
    FILTER (
        Arrival,
        Arrival[Arrival Date] > TODAY ()
            && Arrival[Arrival Date] < DATE ( YEAR ( TODAY () ), 10, 01 )
    )
)

 

For more details, you can download the pbix file from this link: YTD for Fiscal Year

If this reply still couldn't help you solve your problem, you can show me your data model, or you can provide me with your pbix file.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @techvidya 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

v-rzhou-msft
Community Support
Community Support

Hi @techvidya 

Due to I don't know your data model, I build two table sample to have a test.

Arrival Table(Arrival Data Column , Quantity Column)

Calendar table: 

 

Calendar = CALENDAR(DATE(2018,01,01),DATE(2020,12,31))

 

You can build measure to calculate YTD Arrivals and Total Books.

YTD Arrivals: It will calculate the sum of arrivals between 2019/10/01 and Today(2020/09/29)

 

YTD Arrivals =
CALCULATE (
    SUM ( Arrival[Quantity] ),
    FILTER (
        Arrival,
        Arrival[Arrival Date]
            >= DATE ( YEAR ( TODAY () ) - 1, 10, 01 )
            && Arrival[Arrival Date] <= TODAY ()
    )
)

 

Total Booked:It will calculate the sum of arrivals between 2020/09/30 and 2020/10/01 (no equal)

 

Total Booked =
CALCULATE (
    SUM ( Arrival[Quantity] ),
    FILTER (
        Arrival,
        Arrival[Arrival Date] > TODAY ()
            && Arrival[Arrival Date] < DATE ( YEAR ( TODAY () ), 10, 01 )
    )
)

 

For more details, you can download the pbix file from this link: YTD for Fiscal Year

If this reply still couldn't help you solve your problem, you can show me your data model, or you can provide me with your pbix file.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

lbendlin
Super User
Super User

You already have a calendar table. It should have columns for Fiscal Month, Fiscal Quarter and Fiscal Year.

 

In addition functions like TOTALYTD  allow you to specify the last month of your fiscal year.  (Fiscal quarters sadly are not suported by the TOTALQTD function)

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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