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
mlsx4
Super User
Super User

Calculate Table for budgets

Hello everyone,

 

I have my annual budgets in different excels (one per year). Then I want to compare real vs budgeted. But, I here have a problem which is that if I select two years at the same time, this formula won't work:

Monthly budget =
VAR seletectedYear = SELECTEDVALUE ( Calendar[Year] )

VAR FilteredTable =
    CALCULATETABLE (
        Budgets,
        Budget[Year] = seletectedYear )

VAR Result = SUMX ( FilteredTable, Budgets[MonthlyQuantity] )

RETURN Result

 Is there any way to modify it, to work as expected? Thank you in advance

 

 

P.S. For me, it doesn't make sense to group two years but my bosses need it for some reason.

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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