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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors