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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Need help to get YTD for last FY .

Hello Team,

         I have requirement like below.

1.Having FY calender table having columns like Date, FY year, FY month, FY quarter, FY Week number. 

   Note:- FY starts from Jul 1st to Jun 30th every year.

2. Sales table . based on one column i mapped from FY table to this table.

3.currently i should show last 10 FY data in matrics.  i mean today is suppose Jan-03-2022 so i should show all years data to till same day  respect to year. for FY19 data should be till Jan-03-2020, FY20 be like Jan-03-2021.

 

Any ways please let me know

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Here is an instructional video for your reference, 

Power BI - How to Calculate YTD (Year to Date) Rolling Sum - YouTube

Hands-On Power BI Tutorial 📊Beginner to Pro [Full Course] - YouTube

 

Best Regards,

Community Support Team _Tang

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

tamerj1
Super User
Super User

Hi @Anonymous 
You can try the following code for fiscal year - previous year to date

Sales Fiscal PYTD = 
VAR LastMonthInYearAvailable =
    MAX ( 'Date'[Fiscal Month Number] )
VAR LastYearAvailable = SELECTEDVALUE ( 'Date'[Fiscal Year Number] )
VAR PreviousYearAvailable = LastYearAvailable - 1
VAR Result =
    CALCULATE ( 
        [Sales Amount], 
        REMOVEFILTERS ( 'Date' ),
        'Date'[Fiscal Month Number] <= LastMonthInYearAvailable,
        'Date'[Fiscal Year Number] = PreviousYearAvailable
    ) 
RETURN 
    Result

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.