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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GA1993
Helper II
Helper II

Add values per year

Hi, what is a manageable way to calculate or add a certain field/column/value of each year??

The below is an example data I have. I need to add all Training Travel (Plan) values for the year 2019 (highlighted in yellow), and another calculcation will be made on 2020 (highlighted in orange).

GA1993_1-1631246772416.png

 

I have created a table to showcase this, but as you can see, this is hard coded. I believe this is not manageable as time goes by and data gets massive.

 

GA1993_0-1631246577488.png

 

 

This is my code for reference: 

Finance = {
    (2018, (SUMX(FILTER(
        'MP - Engine',
        'MP - Engine'[Start Date].[Year] = 2018
    ), 'MP - Engine'[Training Travel (Planned)]))),
    (2019, (SUMX(FILTER(
        'MP - Engine',
        'MP - Engine'[Start Date].[Year] = 2019
    ), 'MP - Engine'[Training Travel (Planned)]))),
    (2020, (SUMX(FILTER(
        'MP - Engine',
        'MP - Engine'[Start Date].[Year] = 2020
    ), 'MP - Engine'[Training Travel (Planned)]))),
    (2021,(SUMX(FILTER(
        'MP - Engine',
        'MP - Engine'[Start Date].[Year] = 2021
    ), 'MP - Engine'[Training Travel (Planned)])))}

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@GA1993 , Few ways

 

Create a year column in table

year = year([Start Date]) // if text then try ->// left([Start Date],4)

 

then create a new table

 

Summarize(Table, Table[Year], "Total", Sum(Table[Training Travel Plan]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@GA1993 , Few ways

 

Create a year column in table

year = year([Start Date]) // if text then try ->// left([Start Date],4)

 

then create a new table

 

Summarize(Table, Table[Year], "Total", Sum(Table[Training Travel Plan]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.