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! Learn more

Reply
pedroccamaraDBI
Post Partisan
Post Partisan

budget calculation for categories along 4 years

Hello all
I would like to do a budget table that has only 2 columns : budgets and month & Year.
But for year 2018, i want to add 20%, for year 2019 50%, year 2020 70% and so on.
I came up with this but i don' t know how to go further.

Budget =
ADDCOLUMNS(
VALUES( 'Tab Dates'[Month & Year]),
"Budgets", CALCULATE( [Net Sales],'Tab Dates'[Year] = 2018) *1.2)


budget.JPG

Can someone help me?
Thanks a lot

9 REPLIES 9
Anonymous
Not applicable

Hi @pedroccamaraDBI ,

 

If you only have the value of 2018 in the table, you will need to create multiple columns for each year.

 

Best Regards,

Jay

VahidDM
Super User
Super User

Hi @pedroccamaraDBI 

 

Try this:

Budget =
VAR _A =
    SWITCH(
        TRUE(),
        'Tab Dates'[Year] = 2018, 1.2,
        'Tab Dates'[Year] = 2019, 1.5,
        'Tab Dates'[Year] = 2020, 1.7
    )
RETURN
    ADDCOLUMNS( VALUES( 'Tab Dates'[Month & Year] ), "Budgets", [Net Sales] * _A )

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

VahidDM
Super User
Super User

Hi @pedroccamaraDBI 

 

Try this:

Budget =
VAR _A =
    SWITCH(
        TRUE(),
        'Tab Dates'[Year] = 2018, 1.2,
        'Tab Dates'[Year] = 2019, 1.5,
        'Tab Dates'[Year] = 2020, 1.7
    )
RETURN
    ADDCOLUMNS( VALUES( 'Tab Dates'[Month & Year] ), "Budgets", [Net Sales] * _A )

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Hello @VahidDM 
Thank you very much for helping me.
I can't enter tab dates [Year] = 2018, 1.2 and so on
I've tried using calculate here but it won't let me. Can you help me?

@pedroccamaraDBI 

 

Can you share a sample of your data in text format and with all value and columns?
and expected result as well.

 


Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

@pedroccamaraDBI 
Can you share a samle of your PBIX file? after removing sensetive data


Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Hello @VahidDM 
I'm attaching and excel file with my data.
Let me remind what i need:
I want to know the budget for any column i choose in the fact table, product, family, sub family or zone or any date, as long as if the sales of the year is:
2018 then multiply sales of 2018 by 1
2019 then multiply sales of 2018 by 1.2
2020 then multiply sales of 2019 by 1.3
2021 then multiply sales of 2020 by 1.4
2022 then multiply sales of 2021 by 1.5
I hope it's clear.
Thanks a lot
https://drive.google.com/file/d/18mxzktGBs_lNIi7fCu8qF4uL9M2l7YMb/view?usp=sharing 

amitchandak
Super User
Super User

@pedroccamaraDBI , I think what you need  like

 

ADDCOLUMNS(
generate(
Summarize(Table, Table[Year], Table[Month], "_sales", calculate(Sum(Table[Net Sales]), FIlter(Table, Table[Year] =2020))),
union(row("_year", 2019),row("_year", 2020),row("_year", 2018))
), "Sales", Switch(true(), _year =2019, _sales *1.2, _year =2020, _sales *1.5, _sales))

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

Hello @amitchandak 
Thank you very much for you reply. I'm not sure if this is the expected result. Could i have it all budgets in the same column?
budget.JPG
Thanks a lot

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.